diff options
Diffstat (limited to 'src/progs/ingenuity/App.cpp')
-rw-r--r-- | src/progs/ingenuity/App.cpp | 19 |
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() { |