]> Creatis software - bbtk.git/commitdiff
#3296 BBTK Bug New Normal - Error windows Close application
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Fri, 2 Aug 2019 15:28:08 +0000 (17:28 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Fri, 2 Aug 2019 15:28:08 +0000 (17:28 +0200)
kernel/src/bbtkWidgetBlackBox.txx
kernel/src/bbtkWidgetBlackBoxWindow.txx
kernel/src/bbtkWx.cxx
kernel/src/bbtkWxBlackBox.cxx

index 6f2e8a6de5998b189b36de9868744d7cfa970af7..0c2a7a12f6751428e461385c2f4b4897b52e9d4d 100644 (file)
@@ -295,6 +295,9 @@ namespace bbtk
   {
     bbtkBlackBoxDebugMessage("widget",1,"=> WidgetBlackBox::bbCloseWindow() ["
                        <<bbGetFullName()<<"]"<<std::endl);
+                       
+printf("EED WidgetBlackBoxWindow<W>::bbDestroy\n");                    
+
 
     if (bbGetWindow()!=0) bbGetWindow()->bbDestroy();
 
index 13d1273afdacf4f4dd56b9ea518b1c4f619a5f68..14413ed3f9bae7ac650f6a61f6ea5d2b156487fc 100644 (file)
@@ -71,6 +71,8 @@ namespace bbtk
   template <class W>
   WidgetBlackBoxWindow<W>::~WidgetBlackBoxWindow()
   {
+  printf("EED WidgetBlackBoxWindow<W>::~WidgetBlackBoxWindow\n");
+  
     bbtkDebugMessage("widget",9,
                     "WidgetBlackBoxWindow::~WidgetBlackBoxWindow() "
                     <<this<<std::endl);
@@ -116,6 +118,8 @@ namespace bbtk
   void WidgetBlackBoxWindow<W>::bbDestroy()
   {
     
+printf("EED WidgetBlackBoxWindow<W>::bbDestroy \n");   
+
     if (mBox.expired()) return;
     bbtkDebugMessage("widget",9,"WidgetBlackBoxWindow::bbDestroy() [" 
                     <<mBox.lock()->bbGetName()<<"]"<<std::endl);
index 78848c1cef825e7d66fad5a5c6da2cbc90a38712..31b473f3864f51ce91f143bcca725d4bd4ea9ff0 100644 (file)
@@ -106,6 +106,10 @@ namespace bbtk
   {
     if (mgWxApp!= 0) 
       {
+         
+printf("EED Wx::DestroyWxAppIfNeeded \n");
+         
+         
        //      bbtkDebugMessage("wx",1,"  --> Destructing bbtk WxApp"<<std::endl);
        //delete mgWxApp;
        //      mgWxApp = 0;
index 6a26356ce46850b9e14a029e2e6089ed165bc339..8bf6f65548908d4d958790acfa8e046dae704bf6 100644 (file)
@@ -115,14 +115,22 @@ namespace bbtk
   //==================================================================
   WxFrame::~WxFrame() 
     { 
+       
+printf("EED WxFrame::~WxFrame\n");     
+       
       if (mBox.lock())
-       bbtkDebugMessage("widget",9,"["<<mBox.lock()->bbGetName()
+         {
+               bbtkDebugMessage("widget",9,"["<<mBox.lock()->bbGetName()
                         <<"] $$$$$$$$$$$$$$$$$$$ ~WxFrame()"
                         <<std::endl);
-      else 
-       bbtkDebugMessage("widget",9,"[DEAD] $$$$$$$$$$$$$$$$$$$$$ ~WxFrame()"<<std::endl);
-      //bbtkDebugMessage("widget",9,"WxFrame::~WxFrame()"<<std::endl);
-      if (mBox.lock()) mBox.lock()->bbSetWindow(0); 
+      } else { 
+               bbtkDebugMessage("widget",9,"[DEAD] $$$$$$$$$$$$$$$$$$$$$ ~WxFrame()"<<std::endl);
+               //bbtkDebugMessage("widget",9,"WxFrame::~WxFrame()"<<std::endl);
+         } // if mBox.lock()
+      if (mBox.lock()) 
+         {
+               mBox.lock()->bbSetWindow(0); 
+         } // if mBox.lock()
       Wx::DecNbWindowsAlive();
     }
    //==================================================================