diff options
Diffstat (limited to 'src/libs/gui')
-rw-r--r-- | src/libs/gui/LoadPatchWindow.cpp | 8 | ||||
-rw-r--r-- | src/libs/gui/LoadPatchWindow.hpp | 2 | ||||
-rw-r--r-- | src/libs/gui/PatchCanvas.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/ThreadedLoader.cpp | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/src/libs/gui/LoadPatchWindow.cpp b/src/libs/gui/LoadPatchWindow.cpp index 9c31c64c..66aec5b0 100644 --- a/src/libs/gui/LoadPatchWindow.cpp +++ b/src/libs/gui/LoadPatchWindow.cpp @@ -116,6 +116,9 @@ LoadPatchWindow::poly_from_user_selected() void LoadPatchWindow::ok_clicked() { + if (!_patch) + return; + // If unset load_patch will load value optional<const string&> name; @@ -129,11 +132,12 @@ LoadPatchWindow::ok_clicked() if (_patch->path() != "/") parent = _patch->path().parent(); + + _patch.reset(); + hide(); App::instance().loader()->load_patch(true, get_uri(), "/", _initial_data, parent, name); - - hide(); } diff --git a/src/libs/gui/LoadPatchWindow.hpp b/src/libs/gui/LoadPatchWindow.hpp index 4f4ff30c..4f3521e5 100644 --- a/src/libs/gui/LoadPatchWindow.hpp +++ b/src/libs/gui/LoadPatchWindow.hpp @@ -65,7 +65,7 @@ private: GraphObject::Variables _initial_data; SharedPtr<PatchModel> _patch; - bool _replace; + bool _replace; Gtk::RadioButton* _poly_from_current_radio; Gtk::RadioButton* _poly_from_file_radio; diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 918d99ed..ba17b24d 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -199,7 +199,7 @@ PatchCanvas::build() for (ObjectModel::const_iterator i = _patch->children_begin(); i != _patch->children_end(); ++i) { SharedPtr<NodeModel> node = PtrCast<NodeModel>(i->second); - if (node) + if (node && node->parent() == _patch) add_node(node); } diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp index 1b7725a9..3a919bf2 100644 --- a/src/libs/gui/ThreadedLoader.cpp +++ b/src/libs/gui/ThreadedLoader.cpp @@ -104,9 +104,9 @@ ThreadedLoader::load_patch(bool merge, engine_data ))); } - _mutex.unlock(); - whip(); + + _mutex.unlock(); } |