FIX: thumbnail in preview display problem(STUDIO-2578)
after a .gcode.3mf file loaded, the thumbnail in preview will not show until click the canvas3D region. Change-Id: Ia58e5a44ea3dc87ac7609d434aebbf0e89cf3023
This commit is contained in:
parent
b2eee96a80
commit
000fab5261
|
@ -2888,6 +2888,7 @@ void GLCanvas3D::on_idle(wxIdleEvent& evt)
|
|||
// BBS
|
||||
//m_dirty |= wxGetApp().plater()->get_view_toolbar().update_items_state();
|
||||
m_dirty |= wxGetApp().plater()->get_collapse_toolbar().update_items_state();
|
||||
_update_imgui_select_plate_toolbar();
|
||||
bool mouse3d_controller_applied = wxGetApp().plater()->get_mouse3d_controller().apply(wxGetApp().plater()->get_camera());
|
||||
m_dirty |= mouse3d_controller_applied;
|
||||
m_dirty |= wxGetApp().plater()->get_notification_manager()->update_notifications(*this);
|
||||
|
@ -6140,7 +6141,6 @@ bool GLCanvas3D::_init_select_plate_toolbar()
|
|||
bool result = item->image_texture.load_from_svg_file(path + "im_all_plates_stats.svg", false, false, false, 128);
|
||||
result = result && item->image_texture_transparent.load_from_svg_file(path + "im_all_plates_stats_transparent.svg", false, false, false, 128);
|
||||
m_sel_plate_toolbar.m_all_plates_stats_item = item;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -5337,6 +5337,18 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
|
|||
preview->set_as_dirty();
|
||||
};
|
||||
|
||||
//BBS: add the collapse logic
|
||||
if (panel == preview && q->only_gcode_mode()) {
|
||||
this->sidebar->collapse(true);
|
||||
preview->get_canvas3d()->enable_select_plate_toolbar(false);
|
||||
}
|
||||
else if (panel == preview && q->using_exported_file() && (q->m_valid_plates_count <= 1)) {
|
||||
preview->get_canvas3d()->enable_select_plate_toolbar(false);
|
||||
}
|
||||
else {
|
||||
preview->get_canvas3d()->enable_select_plate_toolbar(true);
|
||||
}
|
||||
|
||||
if (current_panel == panel)
|
||||
{
|
||||
//BBS: add slice logic when switch to preview page
|
||||
|
@ -5362,17 +5374,6 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
|
|||
}
|
||||
//#endif
|
||||
current_panel = panel;
|
||||
//BBS: add the collapse logic
|
||||
if (current_panel == preview && q->only_gcode_mode()) {
|
||||
this->sidebar->collapse(true);
|
||||
preview->get_canvas3d()->enable_select_plate_toolbar(false);
|
||||
}
|
||||
else if (current_panel == preview && q->using_exported_file() && (q->m_valid_plates_count <= 1)) {
|
||||
preview->get_canvas3d()->enable_select_plate_toolbar(false);
|
||||
}
|
||||
else {
|
||||
preview->get_canvas3d()->enable_select_plate_toolbar(true);
|
||||
}
|
||||
|
||||
// to reduce flickering when changing view, first set as visible the new current panel
|
||||
for (wxPanel* p : panels) {
|
||||
|
|
Loading…
Reference in New Issue