From a870bb0fc6dc81f73e4b1752429683b1eba62b57 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 2 Aug 2019 17:28:08 +0200 Subject: [PATCH] #3296 BBTK Bug New Normal - Error windows Close application --- kernel/src/bbtkWidgetBlackBox.txx | 3 +++ kernel/src/bbtkWidgetBlackBoxWindow.txx | 4 ++++ kernel/src/bbtkWx.cxx | 4 ++++ kernel/src/bbtkWxBlackBox.cxx | 18 +++++++++++++----- 4 files changed, 24 insertions(+), 5 deletions(-) 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(); } //================================================================== -- 2.47.1