mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-09 01:39:09 +08:00
OSX specific bug fixing
This commit is contained in:
parent
d0e0387b82
commit
fce1943b94
@ -5437,7 +5437,7 @@ void GLCanvas3D::_check_and_update_toolbar_icon_scale() const
|
|||||||
|
|
||||||
// set minimum scale as a auto scale for the toolbars
|
// set minimum scale as a auto scale for the toolbars
|
||||||
float new_scale = std::min(new_h_scale, new_v_scale);
|
float new_scale = std::min(new_h_scale, new_v_scale);
|
||||||
if (fabs(new_scale - scale) > EPSILON)
|
if (fabs(new_scale - scale) > 0.01) // scale is changed by 1% and more
|
||||||
wxGetApp().set_auto_toolbar_icon_scale(new_scale);
|
wxGetApp().set_auto_toolbar_icon_scale(new_scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,6 +483,13 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
|
|||||||
search_list->GetMainWindow()->Bind(wxEVT_LEFT_DOWN, &SearchDialog::OnLeftDown, this);
|
search_list->GetMainWindow()->Bind(wxEVT_LEFT_DOWN, &SearchDialog::OnLeftDown, this);
|
||||||
#endif //__WXMSW__
|
#endif //__WXMSW__
|
||||||
|
|
||||||
|
// Under OSX mouse and key states didn't fill after wxEVT_DATAVIEW_SELECTION_CHANGED call
|
||||||
|
// As a result, we can't to identify what kind of actions was done
|
||||||
|
// So, under OSX is used OnKeyDown function to navigate inside the list
|
||||||
|
#ifndef __APPLE__
|
||||||
|
search_list->Bind(wxEVT_KEY_DOWN, &SearchDialog::OnKeyDown, this);
|
||||||
|
#endif
|
||||||
|
|
||||||
check_category->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
|
check_category->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
|
||||||
if (check_english)
|
if (check_english)
|
||||||
check_english ->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
|
check_english ->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
|
||||||
@ -585,11 +592,16 @@ void SearchDialog::OnSelect(wxDataViewEvent& event)
|
|||||||
if (prevent_list_events)
|
if (prevent_list_events)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Under OSX mouse and key states didn't fill after wxEVT_DATAVIEW_SELECTION_CHANGED call
|
||||||
|
// As a result, we can't to identify what kind of actions was done
|
||||||
|
// So, under OSX is used OnKeyDown function to navigate inside the list
|
||||||
|
#ifndef __APPLE__
|
||||||
// wxEVT_DATAVIEW_SELECTION_CHANGED is processed, when selection is changed after mouse click or press the Up/Down arrows
|
// wxEVT_DATAVIEW_SELECTION_CHANGED is processed, when selection is changed after mouse click or press the Up/Down arrows
|
||||||
// But this two cases should be processed in different way:
|
// But this two cases should be processed in different way:
|
||||||
// Up/Down arrows -> leave it as it is (just a navigation)
|
// Up/Down arrows -> leave it as it is (just a navigation)
|
||||||
// LeftMouseClick -> call the ProcessSelection function
|
// LeftMouseClick -> call the ProcessSelection function
|
||||||
if (wxGetMouseState().LeftIsDown())
|
if (wxGetMouseState().LeftIsDown())
|
||||||
|
#endif //__APPLE__
|
||||||
ProcessSelection(search_list->GetSelection());
|
ProcessSelection(search_list->GetSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user