mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 21:18:58 +08:00
Field: SpinCtrl: Removed code that was relevant for wxSpinCtrl, but not for the new SpinCtrl.
(fix for SPE-2050)
This commit is contained in:
parent
b0ce01de6a
commit
555193f6ec
@ -873,16 +873,7 @@ void SpinCtrl::BUILD() {
|
||||
if (default_value != UNDEF_VALUE)
|
||||
text_value = wxString::Format(_T("%i"), default_value);
|
||||
|
||||
const int min_val = m_opt.min == -FLT_MAX
|
||||
#ifdef __WXOSX__
|
||||
// We will forcibly set the input value for SpinControl, since the value
|
||||
// inserted from the keyboard is not updated under OSX.
|
||||
// So, we can't set min control value bigger then 0.
|
||||
// Otherwise, it couldn't be possible to input from keyboard value
|
||||
// less then min_val.
|
||||
|| m_opt.min > 0
|
||||
#endif
|
||||
? (int)0 : (int)m_opt.min;
|
||||
const int min_val = m_opt.min == -FLT_MAX ? (int)0 : (int)m_opt.min;
|
||||
const int max_val = m_opt.max < FLT_MAX ? (int)m_opt.max : INT_MAX;
|
||||
|
||||
auto temp = new ::SpinInput(m_parent, text_value, "", wxDefaultPosition, size,
|
||||
@ -1003,14 +994,6 @@ void SpinCtrl::propagate_value()
|
||||
if (tmp_value == UNDEF_VALUE) {
|
||||
on_kill_focus();
|
||||
} else {
|
||||
#ifdef __WXOSX__
|
||||
// check input value for minimum
|
||||
if (m_opt.min > 0 && tmp_value < m_opt.min) {
|
||||
::SpinInput* spin = static_cast<::SpinInput*>(window);
|
||||
spin->SetValue(m_opt.min);
|
||||
spin->GetText()->SetInsertionPointEnd();
|
||||
}
|
||||
#endif
|
||||
on_change_field();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user