summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-10 05:45:04 +0000
committerDavid Robillard <d@drobilla.net>2007-10-10 05:45:04 +0000
commitc7f3a28390e651e03a68b664086351788a6a2d73 (patch)
treee4e7037981a876c8e6c69414f6662b0682995212 /src/libs/gui
parent670bf40134c1aa7c1ff175ff8acd9dbed7b9ab41 (diff)
downloadingen-c7f3a28390e651e03a68b664086351788a6a2d73.tar.gz
ingen-c7f3a28390e651e03a68b664086351788a6a2d73.tar.bz2
ingen-c7f3a28390e651e03a68b664086351788a6a2d73.zip
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
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/LoadPatchWindow.cpp8
-rw-r--r--src/libs/gui/LoadPatchWindow.hpp2
-rw-r--r--src/libs/gui/PatchCanvas.cpp2
-rw-r--r--src/libs/gui/ThreadedLoader.cpp4
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();
}