[gnote] Fix notebook template note selection on create



commit dc9b18f728964c616886023ab316b67339c4243d
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date:   Sun Feb 27 19:17:00 2011 +0200

    Fix notebook template note selection on create
    
    Use NoteBuffer::select_note_body for initial selection.
    Fixes Bug 627417.

 src/notebooks/notebook.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/notebooks/notebook.cpp b/src/notebooks/notebook.cpp
index 64deaae..06a3a99 100644
--- a/src/notebooks/notebook.cpp
+++ b/src/notebooks/notebook.cpp
@@ -140,9 +140,7 @@ namespace notebooks {
           
       // Select the initial text
       NoteBuffer::Ptr buffer = 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]