From b7f6b9c6263f3a90dedeed22c445189ae05c9665 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 8 Apr 2016 05:20:42 +0300 Subject: [PATCH] Object List: Reselect last selected object after composing. --- src/MainWindow.vala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index ec07622..47a3c2b 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -168,6 +168,14 @@ namespace LAview.Desktop { if (t_indices.length != 0 && o_indices.length != 0) { AppCore.core.compose_object (window, t_indices[0], o_indices[0]); fill_objects_list (); + + TreeIter iter; + if (treeview_objects.model.get_iter_first(out iter)) { + for (var i = 0; i < o_indices[0]; ++i) + treeview_objects.model.iter_next (ref iter); + treeview_objects.get_selection ().select_iter (iter); + } + statusbar_show (_("After composing all objects print the document.")); } else { statusbar_show (_("Select an object first."));