summaryrefslogtreecommitdiffstats
path: root/src/shape-editor.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-10-12 05:38:02 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-10-12 05:38:02 +0000
commit1beaed203401ab3e55e9c3cb5a94ead41e30e125 (patch)
tree579e08ad216c54da37140a755f638123331c9bf1 /src/shape-editor.cpp
parentrearrange, a couple utility methods for node selection (diff)
downloadinkscape-1beaed203401ab3e55e9c3cb5a94ead41e30e125.tar.gz
inkscape-1beaed203401ab3e55e9c3cb5a94ead41e30e125.zip
scroll desktop to selected node after Tab/Shift-Tab
(bzr r3890)
Diffstat (limited to 'src/shape-editor.cpp')
-rw-r--r--src/shape-editor.cpp12
1 files 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) {