mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Fixed OnContextMenu() under OSX
This commit is contained in:
@@ -738,18 +738,16 @@ void ObjectList::OnContextMenu(wxDataViewEvent&)
|
|||||||
wxDataViewColumn* col;
|
wxDataViewColumn* col;
|
||||||
const wxPoint pt = get_mouse_position_in_control();
|
const wxPoint pt = get_mouse_position_in_control();
|
||||||
HitTest(pt, item, col);
|
HitTest(pt, item, col);
|
||||||
if (!item)
|
|
||||||
#ifdef __WXOSX__ // temporary workaround for OSX
|
#ifdef __WXOSX__ // temporary workaround for OSX
|
||||||
// after Yosemite OS X version, HitTest return undefined item
|
// after Yosemite OS X version, HitTest return undefined item
|
||||||
item = GetSelection();
|
if (!item) item = GetSelection();
|
||||||
if (item)
|
|
||||||
show_context_menu();
|
|
||||||
else
|
|
||||||
printf("undefined item\n");
|
|
||||||
return;
|
|
||||||
#else
|
|
||||||
return;
|
|
||||||
#endif // __WXOSX__
|
#endif // __WXOSX__
|
||||||
|
|
||||||
|
if (!item) {
|
||||||
|
printf("undefined item\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const wxString title = col->GetTitle();
|
const wxString title = col->GetTitle();
|
||||||
|
|
||||||
if (title == " ")
|
if (title == " ")
|
||||||
|
|||||||
Reference in New Issue
Block a user