[gnote] Fix redo with new bulletted row

commit 26576fe44ce0eed5b4b1a9e90dbc2042d0f121a4
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date:   Thu Oct 14 18:36:46 2010 +0300

    Fix redo with new bulletted row
    Pressing enter on bulltetted row creates new bulletted row. It is
    possible to undo this action, but redo does not work as expected
    because iterator is not updated, so the cursor is not placed in the
    right place.

 src/undo.cpp |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/undo.cpp b/src/undo.cpp
index 22bb6f0..c4d8708 100644
--- a/src/undo.cpp
+++ b/src/undo.cpp
@@ -542,8 +542,7 @@ namespace gnote {
   void InsertBulletAction::redo (Gtk::TextBuffer * buffer)
     Gtk::TextIter iter = buffer->get_iter_at_offset (m_offset);
-    buffer->insert (iter, "\n");
+    iter = buffer->insert (iter, "\n");
     dynamic_cast<NoteBuffer*>(buffer)->insert_bullet (iter, 
                                                       m_depth, m_direction);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]