mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-29 17:44:36 +08:00
Try to fix object_ctrl_context_menu on OS X
This commit is contained in:
parent
a56ea9a616
commit
2dcfd74579
@ -1158,6 +1158,7 @@ void update_mode()
|
|||||||
// *** Update showing of the collpane_settings
|
// *** Update showing of the collpane_settings
|
||||||
// show_collpane_settings(mode == ConfigMenuModeExpert);
|
// show_collpane_settings(mode == ConfigMenuModeExpert);
|
||||||
// *************************
|
// *************************
|
||||||
|
g_right_panel->Layout();
|
||||||
g_right_panel->GetParent()->GetParent()->Layout();
|
g_right_panel->GetParent()->GetParent()->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,14 +786,25 @@ void object_ctrl_context_menu()
|
|||||||
const wxPoint pt = get_mouse_position_in_control();
|
const wxPoint pt = get_mouse_position_in_control();
|
||||||
printf("mouse_position_in_control: x = %d, y = %d\n", pt.x, pt.y);
|
printf("mouse_position_in_control: x = %d, y = %d\n", pt.x, pt.y);
|
||||||
m_objects_ctrl->HitTest(pt, item, col);
|
m_objects_ctrl->HitTest(pt, item, col);
|
||||||
if (!item) return;
|
if (!item)
|
||||||
|
#ifdef __WXOSX__ // #ys_FIXME temporary workaround for OSX
|
||||||
|
// after Yosemite OS X version, HitTest return undefined item
|
||||||
|
item = m_objects_ctrl->GetSelection();
|
||||||
|
if (item)
|
||||||
|
show_context_menu();
|
||||||
|
else
|
||||||
|
printf("undefined item\n");
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
return;
|
||||||
|
#endif // __WXOSX__
|
||||||
printf("item exists\n");
|
printf("item exists\n");
|
||||||
const wxString title = col->GetTitle();
|
const wxString title = col->GetTitle();
|
||||||
printf("title = *%s*\n", title.data().AsChar());
|
printf("title = *%s*\n", title.data().AsChar());
|
||||||
|
|
||||||
if (title == " ")
|
if (title == " ")
|
||||||
show_context_menu();
|
show_context_menu();
|
||||||
// ys_FIXME
|
// #ys_FIXME
|
||||||
// else if (title == _("Name") && pt.x >15 &&
|
// else if (title == _("Name") && pt.x >15 &&
|
||||||
// m_objects_model->GetIcon(item).GetRefData() == m_icon_manifold_warning.GetRefData())
|
// m_objects_model->GetIcon(item).GetRefData() == m_icon_manifold_warning.GetRefData())
|
||||||
// {
|
// {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user