Corrections for the last commit

This commit is contained in:
YuSanka 2018-08-16 10:43:56 +02:00
parent e6fce6e1f6
commit eae7752d30

View File

@ -293,24 +293,40 @@ wxBoxSizer* create_objects_list(wxWindow *win)
#endif //__WXOSX__ #endif //__WXOSX__
[](wxKeyEvent& event) { object_ctrl_key_event(event); }); [](wxKeyEvent& event) { object_ctrl_key_event(event); });
m_objects_ctrl->GetMainWindow()->Bind(wxEVT_MOTION, [](wxMouseEvent& event) {
#ifdef __WXMSW__
set_tooltip_for_item(event.GetPosition());
#else
printf("wxEVT_MOTION from GetMainWindow\n");
wxPoint pt;
if (is_mouse_position_in_control(pt))
set_tooltip_for_item(pt);
#endif
event.Skip();
});
#ifndef __WXMSW__
win->Bind(wxEVT_MOTION, [](wxMouseEvent& event) {
printf("wxEVT_MOTION from win\n");
wxPoint pt;
if (is_mouse_position_in_control(pt))
set_tooltip_for_item(pt);
event.Skip();
});
#endif
#ifdef __WXMSW__ #ifdef __WXMSW__
// Extruder value changed // Extruder value changed
m_objects_ctrl->Bind(wxEVT_CHOICE, [](wxCommandEvent& event) { update_extruder_in_config(event.GetString()); }); m_objects_ctrl->Bind(wxEVT_CHOICE, [](wxCommandEvent& event) { update_extruder_in_config(event.GetString()); });
m_objects_ctrl->GetMainWindow()->Bind(wxEVT_MOTION, [](wxMouseEvent& event) { // m_objects_ctrl->GetMainWindow()->Bind(wxEVT_MOTION, [](wxMouseEvent& event) {
set_tooltip_for_item(event.GetPosition()); // set_tooltip_for_item(event.GetPosition());
event.Skip(); // event.Skip();
}); // });
#else #else
// equivalent to wxEVT_CHOICE on __WXMSW__ // equivalent to wxEVT_CHOICE on __WXMSW__
m_objects_ctrl->Bind(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, [](wxDataViewEvent& event) { object_ctrl_item_value_change(event); }); m_objects_ctrl->Bind(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, [](wxDataViewEvent& event) { object_ctrl_item_value_change(event); });
get_right_panel()->Bind(wxEVT_MOTION, [](wxMouseEvent& event) {
event.Skip();
wxPoint pt;
if (is_mouse_position_in_control(pt))
set_tooltip_for_item(pt);
});
#endif //__WXMSW__ #endif //__WXMSW__
m_objects_ctrl->Bind(wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, [](wxDataViewEvent& e) {on_begin_drag(e);}); m_objects_ctrl->Bind(wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, [](wxDataViewEvent& e) {on_begin_drag(e);});