]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWx.cxx
are now generated in user's .bbtk dir
[bbtk.git] / kernel / src / bbtkWx.cxx
index 29567ff69b031e4f560e8f102a8572fe2f7d6682..c8026e40b24f97a4cfa6d1d238e2c45376430d63 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWx.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/21 13:55:49 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2009/01/27 14:22:57 $
+  Version:   $Revision: 1.12 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -302,17 +302,22 @@ namespace bbtk
   Wx::BusyCursor::BusyCursor()
   {
     mCursor = 0;
-    if (TopWindowExists()
+    if (wxApp::GetInstance()!=0
       {        
        bbtkDebugMessage("wx",2,
-                        "Wx::BusyCursor::BusyCursor()"<<std::endl);
-          mCursor = new wxBusyCursor; 
-       //::wxBeginBusyCursor()
+                        "Wx::BusyCursor::BusyCursor() : creating new cursor"
+                        <<std::endl);
+       mCursor = new wxBusyCursor
     }
   }
   Wx::BusyCursor::~BusyCursor()
   {
-    if (mCursor) delete mCursor;
+    if (mCursor)
+      { 
+       delete mCursor;
+       bbtkDebugMessage("wx",2,
+                        "Wx::BusyCursor::~BusyCursor() : deleting cursor"<<std::endl);
+      }
   }
   //=========================================================================