]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWx.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWx.cxx
index a15bb866cc7e47b13804a78a658641e5127a9159..820a60f043c4721c2cd718d28053ac6ea28099e5 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWx.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/08 07:56:11 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2009/05/19 10:19:23 $
+  Version:   $Revision: 1.14 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -134,7 +134,8 @@ namespace bbtk
                  _T("TOP BBTK FRAME (YOU SHOULD NOT SEE ME !!)"));
     top->Hide();
 
-    Wx::SetTopWindow(top);
+    //if (mgTopWindowParent==0) 
+      Wx::SetTopWindow(top);
   }
   //=========================================================================
 
@@ -142,7 +143,8 @@ namespace bbtk
   void Wx::DestroyTopWindowIfNeeded()
   {
     if ( (mgNbWindowsAlive==0) && 
-        (mgAutoDestroyTopWindow) )
+        (mgAutoDestroyTopWindow) &&
+        (mgTopWindow != 0))
       {
        bbtkDebugMessage("wx",1,"  --> Destructing bbtk top window"<<std::endl);
        mgTopWindow->Close();
@@ -258,7 +260,7 @@ namespace bbtk
     bbtkDebugMessage("wx",2,"* Number of windows shown = "<<mgNbWindowsShown
                     <<std::endl);
 
-    DestroyTopWindowIfNeeded();
+    //   DestroyTopWindowIfNeeded();
 
     // BBTKWXSIG
     mgWxSignal();
@@ -306,14 +308,14 @@ namespace bbtk
        bbtkDebugMessage("wx",2,
                         "Wx::BusyCursor::BusyCursor() : creating new cursor"
                         <<std::endl);
-       mCursor = new wxBusyCursor; 
+       //mCursor = new wxBusyCursor; 
     }
   }
   Wx::BusyCursor::~BusyCursor()
   {
     if (mCursor)
       { 
-       delete mCursor;
+       //delete mCursor;
        bbtkDebugMessage("wx",2,
                         "Wx::BusyCursor::~BusyCursor() : deleting cursor"<<std::endl);
       }