mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Fixed bugs from SPE-180
This commit is contained in:
parent
53e100b890
commit
77f5ed6851
5 changed files with 13 additions and 24 deletions
|
@ -404,6 +404,7 @@ void Choice::set_value(boost::any value, bool change_event)
|
|||
case coInt:
|
||||
case coFloat:
|
||||
case coPercent:
|
||||
case coString:
|
||||
case coStrings:{
|
||||
wxString text_value;
|
||||
if (m_opt.type == coInt)
|
||||
|
@ -417,7 +418,6 @@ void Choice::set_value(boost::any value, bool change_event)
|
|||
break;
|
||||
++idx;
|
||||
}
|
||||
// if (m_opt.type == coPercent) text_value += "%";
|
||||
idx == m_opt.enum_values.size() ?
|
||||
dynamic_cast<wxComboBox*>(window)->SetValue(text_value) :
|
||||
dynamic_cast<wxComboBox*>(window)->SetSelection(idx);
|
||||
|
@ -446,6 +446,7 @@ void Choice::set_values(const std::vector<std::string> values)
|
|||
auto ww = dynamic_cast<wxComboBox*>(window);
|
||||
auto value = ww->GetValue();
|
||||
ww->Clear();
|
||||
ww->Append("");
|
||||
for (auto el : values)
|
||||
ww->Append(wxString(el));
|
||||
ww->SetValue(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue