summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/App.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-06 21:08:52 +0000
committerDavid Robillard <d@drobilla.net>2006-09-06 21:08:52 +0000
commit80923fdb966c74263a723f2ac6a39ea44efb07b2 (patch)
treead84b87670612949bad257efed77652e6346beb0 /src/progs/ingenuity/App.cpp
parentdac2461ba66560c00efb43a12e35394a698b60f7 (diff)
downloadingen-80923fdb966c74263a723f2ac6a39ea44efb07b2.tar.gz
ingen-80923fdb966c74263a723f2ac6a39ea44efb07b2.tar.bz2
ingen-80923fdb966c74263a723f2ac6a39ea44efb07b2.zip
Connecting/Disconnecting/Reconnecting to the engine without restarting.
git-svn-id: http://svn.drobilla.net/lad/ingen@115 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/App.cpp')
-rw-r--r--src/progs/ingenuity/App.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 1ca2fec5..26bf50cd 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -43,6 +43,7 @@
#include "PatchTreeWindow.h"
#include "Configuration.h"
#include "ConnectWindow.h"
+#include "Store.h"
#ifdef HAVE_LASH
#include "LashController.h"
#endif
@@ -214,6 +215,24 @@ App::num_open_patch_windows()
return ret;
}
+
+void
+App::disconnect()
+{
+ // FIXME: this is pretty gross.. figure out the death situation better
+
+ list<PatchWindow*> windows = m_windows; // make a copy
+
+ for (list<PatchWindow*>::iterator i = windows.begin(); i != windows.end(); ++i)
+ delete (*i);
+
+ Store::instance().clear();
+
+ // PatchWindow destructor removes them from the list
+ assert(m_windows.size() == 0);
+}
+
+
void
App::quit()
{