From 80923fdb966c74263a723f2ac6a39ea44efb07b2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 6 Sep 2006 21:08:52 +0000 Subject: Connecting/Disconnecting/Reconnecting to the engine without restarting. git-svn-id: http://svn.drobilla.net/lad/ingen@115 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/App.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/progs/ingenuity/App.cpp') 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 windows = m_windows; // make a copy + + for (list::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() { -- cgit v1.2.1