From 1beaed203401ab3e55e9c3cb5a94ead41e30e125 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Fri, 12 Oct 2007 05:38:02 +0000 Subject: scroll desktop to selected node after Tab/Shift-Tab (bzr r3890) --- src/shape-editor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/shape-editor.cpp') diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index d9a500e3c..f029aab0a 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -442,12 +442,20 @@ void ShapeEditor::select_all_from_subpath (bool invert) { sp_nodepath_select_all_from_subpath (this->nodepath, invert); } void ShapeEditor::select_next () { - if (this->nodepath) + if (this->nodepath) { sp_nodepath_select_next (this->nodepath); + if (this->nodepath->numSelected() >= 1) { + this->desktop->scroll_to_point(&(this->nodepath->singleSelectedCoords()), 1.0); + } + } } void ShapeEditor::select_prev () { - if (this->nodepath) + if (this->nodepath) { sp_nodepath_select_prev (this->nodepath); + if (this->nodepath->numSelected() >= 1) { + this->desktop->scroll_to_point(&(this->nodepath->singleSelectedCoords()), 1.0); + } + } } void ShapeEditor::show_handles (bool show) { -- cgit v1.2.3