]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxBlackBox.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxBlackBox.cxx
index 26256752a66b4cf04c2cda332edf13501b4505e5..1050f0441871d305191f6b8d25bec281fa3237a1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/07/23 11:46:11 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2008/07/25 07:44:12 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -141,11 +141,12 @@ namespace bbtk
   //=========================================================================
   void WxBlackBoxDialog::bbShow()
   { 
+    if (bbIsShown()) return;
     bbtkDebugMessage("wx",5,"WxBlackBoxDialog::bbShow() ["
                     <<bbGetBlackBox()->bbGetFullName()<<"]"<<std::endl);
     WxBlackBoxWindow::bbShow();
     SetReturnCode( wxDialog::ShowModal() ); 
-    bbHide();
+    bbClose();
   }
   //=========================================================================
 
@@ -161,7 +162,8 @@ namespace bbtk
   //=========================================================================
   void WxBlackBoxDialog::bbClose()
   {
-    wxDialog::Close();
+    bbtkDebugMessage("wx",9,"WxBlackBoxDialog::bbClose()"<<std::endl);
+    wxDialog::Destroy();
   }
   //=========================================================================
 
@@ -223,6 +225,7 @@ namespace bbtk
   //=========================================================================
   void WxBlackBoxFrame::bbShow() 
   { 
+    if (bbIsShown()) return;
     bbtkDebugMessage("wx",5,"WxBlackBoxFrame::bbShow("
                     <<bbGetBlackBox()->bbGetFullName()<<")"<<std::endl);
     WxBlackBoxWindow::bbShow();
@@ -255,6 +258,7 @@ namespace bbtk
   //=========================================================================
   void WxBlackBoxFrame::bbClose()
   {
+    bbtkDebugMessage("wx",9,"WxBlackBoxFrame::bbClose()"<<std::endl);
     wxFrame::Close();
   }
   //=========================================================================