Bug fixing:

OSX specific: 1. For slNew and slDlg settings layout modes main frame could be minimized to the ridicules size.
                 So, set size for the Plater (as a min(default) size for the wxPanel)
              2. model->Clear() invoke wxEVT_DATAVIEW_SELECTION_CHANGED. So, set prevent_list_events before this call.
              3. Added a rounding for the scale value

Fix of #4261 (for the English version was called GetValue for non-created check control)
This commit is contained in:
YuSanka 2020-05-18 15:56:33 +02:00
parent 3f68229f1e
commit 5c142ccfd6
3 changed files with 11 additions and 7 deletions

View file

@ -613,7 +613,7 @@ void GUI_App::set_auto_toolbar_icon_scale(float scale) const
const float icon_sc = m_em_unit * 0.1f;
#endif // __APPLE__
int int_val = std::min(int(scale / icon_sc * 100), 100);
long int_val = std::min(int(std::lround(scale / icon_sc * 100)), 100);
std::string val = std::to_string(int_val);
app_config->set("auto_toolbar_size", val);