summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-12-21 22:53:20 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-12-21 22:53:20 +0000
commit06f8d132963e23bef5d1a1ccb483787eadf31b3a (patch)
treeb2bb69fdde042f8f7fa513c78934b113262666ae /src
parentRemove sp_desktop_document and finish cleanup of desktop-handles.h (diff)
downloadinkscape-06f8d132963e23bef5d1a1ccb483787eadf31b3a.tar.gz
inkscape-06f8d132963e23bef5d1a1ccb483787eadf31b3a.zip
Bug #1380413: make sure that the rect toolbar knows when and when not to update
(bzr r13821)
Diffstat (limited to 'src')
-rw-r--r--src/widgets/rect-toolbar.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index b78f74d94..016aa4987 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -404,12 +404,20 @@ static void rect_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolB
{
static sigc::connection changed;
- // TODO fixme: use of dynamic_cast<> seems wrong here.
+ // use of dynamic_cast<> seems wrong here -- we just need to check the current tool
+
if (dynamic_cast<Inkscape::UI::Tools::RectTool *>(ec)) {
- changed = desktop->getSelection()->connectChanged(sigc::bind(sigc::ptr_fun(sp_rect_toolbox_selection_changed), holder));
+ Inkscape::Selection *sel = desktop->getSelection();
+
+ changed = sel->connectChanged(sigc::bind(sigc::ptr_fun(sp_rect_toolbox_selection_changed), holder));
+
+ // Synthesize an emission to trigger the update
+ sp_rect_toolbox_selection_changed(sel, holder);
} else {
- if (changed)
+ if (changed) {
changed.disconnect();
+ purge_repr_listener(NULL, holder);
+ }
}
}