]> Creatis software - bbtk.git/commitdiff
#3521 Init output ButtonSelectFilesDirectory
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Sat, 29 Jun 2024 10:10:23 +0000 (12:10 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Sat, 29 Jun 2024 10:10:23 +0000 (12:10 +0200)
packages/wx/src/bbwxButtonSelectFilesDirectory.cxx

index 4cf64cceedfe04b1d8ea05d66898670c0a03bf2a..fd386a27348cc8518d332e2908c06c2fda776247 100644 (file)
@@ -141,10 +141,6 @@ void ButtonSelectFilesDirectoryWidget::OnButton( wxEvent& )
   }
 
 
-
-
-
-
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ButtonSelectFilesDirectory)
 BBTK_BLACK_BOX_IMPLEMENTATION(ButtonSelectFilesDirectory,bbtk::WxBlackBox);
 //===== 
@@ -152,28 +148,33 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ButtonSelectFilesDirectory,bbtk::WxBlackBox);
 //===== 
 void ButtonSelectFilesDirectory::Process()
 {
-
     ButtonSelectFilesDirectoryWidget* w = (ButtonSelectFilesDirectoryWidget*)bbGetOutputWidget();
     if (w) 
        {
                UpdateLabel();
        }
-  
+    
+    if (bbGetInputType()==1)
+    {
+        bbSetOutputOut( bbGetInputDefaultDir() );
+    } else {
+        bbSetOutputOut( bbGetInputDefaultFile() );
+    }
+
 }
-//===== 
+
+//=====
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void ButtonSelectFilesDirectory::CreateWidget(wxWindow* parent)
 {
-
     bbSetOutputWidget
       ( new ButtonSelectFilesDirectoryWidget ( this, //bbGetWxParent(), 
                                                                 parent,
                                                                 bbtk::std2wx(bbGetInputLabel()) ) );
-
-  
 }
-//===== 
+
+//=====
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void ButtonSelectFilesDirectory::bbUserSetDefaultValues()
@@ -186,14 +187,13 @@ void ButtonSelectFilesDirectory::bbUserSetDefaultValues()
 //===== 
 void ButtonSelectFilesDirectory::bbUserInitializeProcessing()
 {
-
 }
-//===== 
+
+//=====
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void ButtonSelectFilesDirectory::bbUserFinalizeProcessing()
 {
-
 }
 
 void ButtonSelectFilesDirectory::UpdateLabel()