mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
OSX specific bug fixing
This commit is contained in:
parent
d0e0387b82
commit
fce1943b94
2 changed files with 13 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue