mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-30 01:54:40 +08:00
Next experiment
This commit is contained in:
parent
fede9e95ff
commit
72c77a3592
@ -215,28 +215,30 @@ wxBoxSizer* content_objects_list(wxWindow *win)
|
|||||||
m_objects_ctrl->GetMainWindow()->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent& event) {
|
m_objects_ctrl->GetMainWindow()->Bind(wxEVT_LEFT_DOWN, [](wxMouseEvent& event) {
|
||||||
wxPoint pt = event.GetPosition();
|
wxPoint pt = event.GetPosition();
|
||||||
wxString msg = wxString::Format("wxEVT_LEFT_DOWN\n Position: x - %d, y - %d", pt.x, pt.y);
|
wxString msg = wxString::Format("wxEVT_LEFT_DOWN\n Position: x - %d, y - %d", pt.x, pt.y);
|
||||||
auto msg_box = wxMessageBox(msg);
|
wxMessageBox(msg);
|
||||||
wxDataViewItem item;
|
wxDataViewItem item;
|
||||||
wxDataViewColumn* col;
|
wxDataViewColumn* col;
|
||||||
m_objects_ctrl->HitTest(pt, item, col);
|
m_objects_ctrl->HitTest(pt, item, col);
|
||||||
wxString title = col->GetTitle();
|
wxString title = col->GetTitle();
|
||||||
if (item && (title==" " || title == _("Name"))) {
|
if (!item) {
|
||||||
if (item != m_objects_ctrl->GetSelection()) {
|
event.Skip();
|
||||||
m_objects_ctrl->Select(item);
|
return;
|
||||||
object_ctrl_selection_changed();
|
|
||||||
g_prevent_list_events = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (title == " ")
|
|
||||||
object_ctrl_context_menu();
|
|
||||||
else if (title == _("Name") && pt.x >15 &&
|
|
||||||
m_objects_model->GetIcon(item).GetRefData() == m_icon_manifold_warning.GetRefData())
|
|
||||||
{
|
|
||||||
// ys_FIXME
|
|
||||||
// if (is_windows10())
|
|
||||||
// fix_through_netfabb();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (item != m_objects_ctrl->GetSelection()) {
|
||||||
|
m_objects_ctrl->Select(item);
|
||||||
|
object_ctrl_selection_changed();
|
||||||
|
g_prevent_list_events = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (title == " ")
|
||||||
|
object_ctrl_context_menu();
|
||||||
|
// ys_FIXME
|
||||||
|
// else if (title == _("Name") && pt.x >15 &&
|
||||||
|
// m_objects_model->GetIcon(item).GetRefData() == m_icon_manifold_warning.GetRefData())
|
||||||
|
// {
|
||||||
|
// if (is_windows10())
|
||||||
|
// fix_through_netfabb();
|
||||||
|
// }
|
||||||
event.Skip();
|
event.Skip();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -277,8 +279,8 @@ wxBoxSizer* content_objects_list(wxWindow *win)
|
|||||||
|
|
||||||
m_objects_ctrl->GetMainWindow()->Bind(wxEVT_MOTION, [](wxMouseEvent& event) {
|
m_objects_ctrl->GetMainWindow()->Bind(wxEVT_MOTION, [](wxMouseEvent& event) {
|
||||||
wxPoint pt = event.GetPosition();
|
wxPoint pt = event.GetPosition();
|
||||||
wxString msg = wxString::Format("wxEVT_MOTION\n Position: x - %d, y - %d", pt.x, pt.y);
|
wxString msg = wxString::Format("wxEVT_MOTION\n Position: x = %d, y = %d", pt.x, pt.y);
|
||||||
auto msg_box = wxMessageBox(msg);
|
wxMessageBox(msg, wxEmptyString, 4, nullptr, pt.x, pt.y);
|
||||||
wxDataViewItem item;
|
wxDataViewItem item;
|
||||||
wxDataViewColumn* col;
|
wxDataViewColumn* col;
|
||||||
m_objects_ctrl->HitTest(pt, item, col);
|
m_objects_ctrl->HitTest(pt, item, col);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user