From 35e9c17d68bcf4b5eeb027314368d9d3e3bb0b34 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Sat, 29 Jun 2024 12:10:23 +0200 Subject: [PATCH] #3521 Init output ButtonSelectFilesDirectory --- .../wx/src/bbwxButtonSelectFilesDirectory.cxx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) 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() -- 2.47.1