OSX specific bug fixing
This commit is contained in:
parent
d0e0387b82
commit
fce1943b94
2 changed files with 13 additions and 1 deletions
|
@ -5437,7 +5437,7 @@ void GLCanvas3D::_check_and_update_toolbar_icon_scale() const
|
|||
|
||||
// set minimum scale as a auto scale for the toolbars
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -483,6 +483,13 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
|
|||
search_list->GetMainWindow()->Bind(wxEVT_LEFT_DOWN, &SearchDialog::OnLeftDown, this);
|
||||
#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);
|
||||
if (check_english)
|
||||
check_english ->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
|
||||
|
@ -585,11 +592,16 @@ void SearchDialog::OnSelect(wxDataViewEvent& event)
|
|||
if (prevent_list_events)
|
||||
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
|
||||
// But this two cases should be processed in different way:
|
||||
// Up/Down arrows -> leave it as it is (just a navigation)
|
||||
// LeftMouseClick -> call the ProcessSelection function
|
||||
if (wxGetMouseState().LeftIsDown())
|
||||
#endif //__APPLE__
|
||||
ProcessSelection(search_list->GetSelection());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue