From 453ab85aacd945bf49ff1a7b51bb5ec1569de568 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Fri, 12 Oct 2007 05:38:02 +0000 Subject: [PATCH] scroll desktop to selected node after Tab/Shift-Tab --- src/shape-editor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) { -- 2.30.2