From: eduardo.davila@creatis.insa-lyon.fr Date: Sat, 29 Jun 2024 10:10:23 +0000 (+0200) Subject: #3521 Init output ButtonSelectFilesDirectory X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=35e9c17d68bcf4b5eeb027314368d9d3e3bb0b34;p=bbtk.git #3521 Init output ButtonSelectFilesDirectory --- diff --git a/packages/wx/src/bbwxButtonSelectFilesDirectory.cxx b/packages/wx/src/bbwxButtonSelectFilesDirectory.cxx index 4cf64cc..fd386a2 100644 --- a/packages/wx/src/bbwxButtonSelectFilesDirectory.cxx +++ b/packages/wx/src/bbwxButtonSelectFilesDirectory.cxx @@ -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()