Code

r16407@tres: ted | 2007-08-29 22:33:35 -0700
authorgouldtj <gouldtj@users.sourceforge.net>
Sat, 1 Sep 2007 04:34:28 +0000 (04:34 +0000)
committergouldtj <gouldtj@users.sourceforge.net>
Sat, 1 Sep 2007 04:34:28 +0000 (04:34 +0000)
 Fixing a crash on signal deletion and also making it so that OK is
 handled correctly.

src/extension/execution-env.cpp

index caef5033a9fe90538b109bb583b1970b9de9fa63..ffaaed86d60968140fca0e969fb7be0c7ec74152 100644 (file)
@@ -78,7 +78,9 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk
 
 ExecutionEnv::~ExecutionEnv (void) {
     _dialogsig.disconnect();
-    _changesig.disconnect();
+    if (_prefsVisible) {
+        _changesig.disconnect();
+    }
     if (_visibleDialog != NULL && !_shutdown) {
         delete _visibleDialog;
     }
@@ -121,6 +123,7 @@ ExecutionEnv::createWorkingDialog (void) {
     }
     if (_changeSignal != NULL) {
         delete _changeSignal;
+        _changeSignal = NULL;
     }
 
     gchar * dlgmessage = g_strdup_printf(_("'%s' working, please wait..."), _effect->get_name());
@@ -148,12 +151,17 @@ ExecutionEnv::workingCanceled (const int resp) {
 void
 ExecutionEnv::preferencesResponse (const int resp) {
     if (resp == Gtk::RESPONSE_OK) {
-        if (_humanWait) {
+        if (_humanWait && _livePreview) {
             documentCommit();
             _mainloop->quit();
             _finished = true;
         } else {
             createWorkingDialog();
+            if (!_livePreview) {
+                _mainloop->quit();
+                _humanWait = false;
+                _livePreview = true; // this is counter intuitive
+            }
         }
     } else {
         if (_humanWait) {