From c7f3a28390e651e03a68b664086351788a6a2d73 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 10 Oct 2007 05:45:04 +0000 Subject: Fix recursive patch problems (all objects recursively appearing as direct child of root). Use slightly more human friendly names for blank nodes in patch files. Fix memory management semantics of engine side objects (fix crash on subpatch delete). Make Raul::Table a boost::noncopyable; related changes trickled down from that. git-svn-id: http://svn.drobilla.net/lad/ingen@865 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/LoadPatchWindow.cpp | 8 ++++++-- src/libs/gui/LoadPatchWindow.hpp | 2 +- src/libs/gui/PatchCanvas.cpp | 2 +- src/libs/gui/ThreadedLoader.cpp | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/libs/gui') 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 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 _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 node = PtrCast(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(); } -- cgit v1.2.1