diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-06-09 05:46:29 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-06-09 05:46:29 +0000 |
| commit | 93c9dbb172468ba3d979d3bae057f330cf802875 (patch) | |
| tree | 62bf29ce4f637ef149e73d6df53e0a1c6df6d540 /src/ui/dialog/livepatheffect-editor.cpp | |
| parent | renaming, adding missed ones to the list (diff) | |
| download | inkscape-93c9dbb172468ba3d979d3bae057f330cf802875.tar.gz inkscape-93c9dbb172468ba3d979d3bae057f330cf802875.zip | |
add selmodified connection to force dialog update on undo
(bzr r5865)
Diffstat (limited to 'src/ui/dialog/livepatheffect-editor.cpp')
| -rw-r--r-- | src/ui/dialog/livepatheffect-editor.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index 2dc4fda71..c1bbaa022 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -55,6 +55,12 @@ static void lpeeditor_selection_changed (Inkscape::Selection * selection, gpoint lpeeditor->onSelectionChanged(selection); } +static void lpeeditor_selection_modified (Inkscape::Selection * selection, guint /*flags*/, gpointer data) +{ + LivePathEffectEditor *lpeeditor = static_cast<LivePathEffectEditor *>(data); + lpeeditor->onSelectionChanged(selection); +} + /*####################### * LivePathEffectEditor @@ -157,6 +163,7 @@ LivePathEffectEditor::~LivePathEffectEditor() if (current_desktop) { selection_changed_connection.disconnect(); + selection_modified_connection.disconnect(); } } @@ -238,7 +245,7 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel) } else { - showText(_("Item is not compound by paths")); + showText(_("Item is not a path or shape")); set_sensitize_all(false); } } else { @@ -278,6 +285,7 @@ LivePathEffectEditor::setDesktop(SPDesktop *desktop) if (current_desktop) { selection_changed_connection.disconnect(); + selection_modified_connection.disconnect(); } current_desktop = desktop; @@ -285,6 +293,8 @@ LivePathEffectEditor::setDesktop(SPDesktop *desktop) Inkscape::Selection *selection = sp_desktop_selection(desktop); selection_changed_connection = selection->connectChanged( sigc::bind (sigc::ptr_fun(&lpeeditor_selection_changed), this ) ); + selection_modified_connection = selection->connectModified( + sigc::bind (sigc::ptr_fun(&lpeeditor_selection_modified), this ) ); onSelectionChanged(selection); } else { @@ -350,10 +360,10 @@ void LivePathEffectEditor::onUp() SPItem *item = sel->singleItem(); if ( item && SP_IS_LPE_ITEM(item) ) { - sp_lpe_item_up_current_path_effect(SP_LPE_ITEM(item)); + sp_lpe_item_up_current_path_effect(SP_LPE_ITEM(item)); sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT, - _("Remove path effect") ); + _("Move path effect up") ); effect_list_update(SP_LPE_ITEM(item)); } @@ -368,10 +378,10 @@ void LivePathEffectEditor::onDown() SPItem *item = sel->singleItem(); if ( item && SP_IS_LPE_ITEM(item) ) { - sp_lpe_item_down_current_path_effect(SP_LPE_ITEM(item)); + sp_lpe_item_down_current_path_effect(SP_LPE_ITEM(item)); sp_document_done ( sp_desktop_document (current_desktop), SP_VERB_DIALOG_LIVE_PATH_EFFECT, - _("Remove path effect") ); + _("Move path effect down") ); effect_list_update(SP_LPE_ITEM(item)); } |
