FIX: fix bug that thumbnail is not display
Change-Id: Ic974e378fbcaea096f5e2aa8b40092d2ef3e8e54
This commit is contained in:
parent
7a5771419a
commit
9a640be43c
|
@ -2360,6 +2360,8 @@ void MachineObject::update_slice_info(std::string project_id, std::string profil
|
||||||
if (plate_idx >= 0) {
|
if (plate_idx >= 0) {
|
||||||
plate_index = plate_idx;
|
plate_index = plate_idx;
|
||||||
} else {
|
} else {
|
||||||
|
if (subtask_id.compare("0") == 0)
|
||||||
|
return;
|
||||||
m_agent->get_task_plate_index(subtask_id, &plate_index);
|
m_agent->get_task_plate_index(subtask_id, &plate_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2133,7 +2133,6 @@ void GLCanvas3D::bind_event_handlers()
|
||||||
m_canvas->Bind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
m_canvas->Bind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||||
m_canvas->Bind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
m_canvas->Bind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
||||||
m_canvas->Bind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
|
m_canvas->Bind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
|
||||||
m_canvas->Bind(wxEVT_KILL_FOCUS, &GLCanvas3D::on_kill_focus, this);
|
|
||||||
m_event_handlers_bound = true;
|
m_event_handlers_bound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2163,7 +2162,6 @@ void GLCanvas3D::unbind_event_handlers()
|
||||||
m_canvas->Unbind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
m_canvas->Unbind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||||
m_canvas->Unbind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
m_canvas->Unbind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
||||||
m_canvas->Unbind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
|
m_canvas->Unbind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
|
||||||
m_canvas->Unbind(wxEVT_KILL_FOCUS, &GLCanvas3D::on_kill_focus, this);
|
|
||||||
|
|
||||||
m_event_handlers_bound = false;
|
m_event_handlers_bound = false;
|
||||||
}
|
}
|
||||||
|
@ -3484,19 +3482,14 @@ void GLCanvas3D::on_set_focus(wxFocusEvent& evt)
|
||||||
{
|
{
|
||||||
m_tooltip_enabled = false;
|
m_tooltip_enabled = false;
|
||||||
if (m_canvas_type == ECanvasType::CanvasPreview) {
|
if (m_canvas_type == ECanvasType::CanvasPreview) {
|
||||||
|
// update thumbnails and update plate toolbar
|
||||||
|
wxGetApp().plater()->update_platplate_thumbnails();
|
||||||
_update_imgui_select_plate_toolbar();
|
_update_imgui_select_plate_toolbar();
|
||||||
}
|
}
|
||||||
_refresh_if_shown_on_screen();
|
_refresh_if_shown_on_screen();
|
||||||
m_tooltip_enabled = true;
|
m_tooltip_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLCanvas3D::on_kill_focus(wxFocusEvent& evt)
|
|
||||||
{
|
|
||||||
if (m_canvas_type == ECanvasType::CanvasView3D) {
|
|
||||||
wxGetApp().plater()->update_platplate_thumbnails();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Size GLCanvas3D::get_canvas_size() const
|
Size GLCanvas3D::get_canvas_size() const
|
||||||
{
|
{
|
||||||
int w = 0;
|
int w = 0;
|
||||||
|
|
|
@ -767,7 +767,6 @@ public:
|
||||||
void on_mouse(wxMouseEvent& evt);
|
void on_mouse(wxMouseEvent& evt);
|
||||||
void on_paint(wxPaintEvent& evt);
|
void on_paint(wxPaintEvent& evt);
|
||||||
void on_set_focus(wxFocusEvent& evt);
|
void on_set_focus(wxFocusEvent& evt);
|
||||||
void on_kill_focus(wxFocusEvent& evt);
|
|
||||||
|
|
||||||
Size get_canvas_size() const;
|
Size get_canvas_size() const;
|
||||||
Vec2d get_local_mouse_position() const;
|
Vec2d get_local_mouse_position() const;
|
||||||
|
|
Loading…
Reference in New Issue