From 703b304c122f85e82d4a036e51ced891720e7356 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 19 Oct 2016 15:42:09 +0200 Subject: [PATCH] #3030 creaWT Bug New Normal - ComboBox update --- wt/bbtk_wt_PKG/src/bbwtComboBox.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx index 2a4bf63..3ab0146 100644 --- a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx +++ b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx @@ -15,7 +15,7 @@ namespace bbwt int typeForm); ~ComboBoxWidget(); void OnComboBox(); - void AddItems( std::vector lstIn ); + void SetItems( std::vector lstIn ); private: int mTypeForm; @@ -82,9 +82,12 @@ namespace bbwt } //-------------------------------------------------------------------------- - void ComboBoxWidget::AddItems( std::vector lstIn ) + void ComboBoxWidget::SetItems( std::vector lstIn ) { int i; + + selection->clear(); + for (i=0;iaddItem(bbtk::std2wt(lstIn[i])); @@ -101,9 +104,9 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WtBlackBox); void ComboBox::Process() { - ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget(); - widget->AddItems( bbGetInputIn() ); - + ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget(); + widget->SetItems( bbGetInputIn() ); + } //===== // 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) -- 2.44.0