From: Eduardo DAVILA Date: Fri, 2 Aug 2019 15:28:08 +0000 (+0200) Subject: #3296 BBTK Bug New Normal - Error windows Close application X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a870bb0fc6dc81f73e4b1752429683b1eba62b57;p=bbtk.git #3296 BBTK Bug New Normal - Error windows Close application --- diff --git a/kernel/src/bbtkWidgetBlackBox.txx b/kernel/src/bbtkWidgetBlackBox.txx index 6f2e8a6..0c2a7a1 100644 --- a/kernel/src/bbtkWidgetBlackBox.txx +++ b/kernel/src/bbtkWidgetBlackBox.txx @@ -295,6 +295,9 @@ namespace bbtk { bbtkBlackBoxDebugMessage("widget",1,"=> WidgetBlackBox::bbCloseWindow() [" <::bbDestroy\n"); + if (bbGetWindow()!=0) bbGetWindow()->bbDestroy(); diff --git a/kernel/src/bbtkWidgetBlackBoxWindow.txx b/kernel/src/bbtkWidgetBlackBoxWindow.txx index 13d1273..14413ed 100644 --- a/kernel/src/bbtkWidgetBlackBoxWindow.txx +++ b/kernel/src/bbtkWidgetBlackBoxWindow.txx @@ -71,6 +71,8 @@ namespace bbtk template WidgetBlackBoxWindow::~WidgetBlackBoxWindow() { + printf("EED WidgetBlackBoxWindow::~WidgetBlackBoxWindow\n"); + bbtkDebugMessage("widget",9, "WidgetBlackBoxWindow::~WidgetBlackBoxWindow() " <::bbDestroy() { +printf("EED WidgetBlackBoxWindow::bbDestroy \n"); + if (mBox.expired()) return; bbtkDebugMessage("widget",9,"WidgetBlackBoxWindow::bbDestroy() [" <bbGetName()<<"]"< Destructing bbtk WxApp"<bbGetName() + { + bbtkDebugMessage("widget",9,"["<bbGetName() <<"] $$$$$$$$$$$$$$$$$$$ ~WxFrame()" <bbSetWindow(0); + } else { + bbtkDebugMessage("widget",9,"[DEAD] $$$$$$$$$$$$$$$$$$$$$ ~WxFrame()"<bbSetWindow(0); + } // if mBox.lock() Wx::DecNbWindowsAlive(); } //==================================================================