diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-01-01 12:18:42 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-01-01 12:18:42 +0000 |
| commit | 0b983c4b758727e27347abf67467883f40741aa0 (patch) | |
| tree | fe991bcf42ea02efda23a77e8c243bc850651285 /src/dialogs/item-properties.cpp | |
| parent | Added signal for desktop destruction to allow for proper removal of tracked s... (diff) | |
| download | inkscape-0b983c4b758727e27347abf67467883f40741aa0.tar.gz inkscape-0b983c4b758727e27347abf67467883f40741aa0.zip | |
Item and image properties dialog update: restoring correct behaviour in case of deleting an object
(bzr r10815)
Diffstat (limited to 'src/dialogs/item-properties.cpp')
| -rw-r--r-- | src/dialogs/item-properties.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 1101f9eec..16c29a69f 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -142,7 +142,7 @@ SPItemDialog::SPItemDialog (void) : wd.stop = 0; //set callback for the new dialog - g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_transientize_callback), dlg); + g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_transientize_callback), &wd); g_signal_connect ( G_OBJECT (dlg), "event", G_CALLBACK (sp_dialog_event_handler), dlg); // g_signal_connect ( G_OBJECT (dlg), "destroy", G_CALLBACK (sp_item_dialog_delete), dlg); g_signal_connect ( G_OBJECT (dlg), "delete_event", G_CALLBACK (sp_item_dialog_delete), dlg); @@ -186,6 +186,7 @@ SPItemDialog::~SPItemDialog (void) prefs->setInt(prefs_path + "h", h); sp_signal_disconnect_by_data (INKSCAPE, wd.win); + sp_signal_disconnect_by_data (INKSCAPE, &wd); if (window) { //should actually always be true, but for safety check @@ -318,10 +319,14 @@ void SPItemDialog::widget_setup(void) Inkscape::Selection *selection = sp_desktop_selection (SP_ACTIVE_DESKTOP); if (!selection->singleItem()) { - set_sensitive (false); + vb.set_sensitive (false); + CurrentItem = NULL; + //no selection anymore or multiple objects selected, means that we need + //to close the connections to the previously selected object + attrTable.clear(); return; } else { - set_sensitive (true); + vb.set_sensitive (true); } SPItem *item = selection->singleItem(); |
