[gnote] Fix template note selection on creation



commit fe10051d2c54287854f1ccffd0ce9bf201271460
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date:   Sun Feb 27 19:14:36 2011 +0200

    Fix template note selection on creation
    
    Use NoteBuffer::select_note_body for initial selection.
    Fixes Bug 627418.

 src/notemanager.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index a148c36..94446a4 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -661,9 +661,7 @@ namespace gnote {
           
       // Select the initial text
       Glib::RefPtr<NoteBuffer> buffer = template_note->get_buffer();
-      Gtk::TextIter iter = buffer->get_iter_at_line_offset(2, 0);
-      buffer->move_mark(buffer->get_selection_bound(), iter);
-      buffer->move_mark(buffer->get_insert(), buffer->end());
+      buffer->select_note_body();
 
       // Flag this as a template note
       Tag::Ptr template_tag = TagManager::obj().get_or_create_system_tag (TagManager::TEMPLATE_NOTE_SYSTEM_TAG);



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