mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-23 02:42:08 +00:00
Crash fix assembly mode flatpak (#13413)
* Update GLCanvas3D.cpp * Update GLCanvas3D.cpp * update * Update GLCanvas3D.cpp Co-Authored-By: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> --------- Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
This commit is contained in:
@@ -6923,6 +6923,12 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
}
|
||||
|
||||
if (load_model) {
|
||||
if (!q->m_exported_file && view3D != nullptr) {
|
||||
// Force a 3D scene refresh after view/plate selection to avoid losing the first load
|
||||
// on platforms where the GL canvas mapping lags behind model loading.
|
||||
view3D->reload_scene(true);
|
||||
view3D->set_as_dirty();
|
||||
}
|
||||
if (!silence) wxGetApp().app_config->update_skein_dir(input_files[input_files.size() - 1].parent_path().make_preferred().string());
|
||||
// XXX: Plater.pm had @loaded_files, but didn't seem to fill them with the filenames...
|
||||
}
|
||||
@@ -9130,6 +9136,20 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
|
||||
|
||||
if (current_panel == panel)
|
||||
{
|
||||
if (panel == view3D) {
|
||||
if (view3D->is_reload_delayed()) {
|
||||
// Delayed loading of the 3D scene when caller requests the already active tab.
|
||||
if (printer_technology == ptSLA)
|
||||
update_restart_background_process(true, false);
|
||||
else
|
||||
view3D->reload_scene(true);
|
||||
}
|
||||
|
||||
view3D->set_as_dirty();
|
||||
view3D->get_canvas3d()->reset_old_size();
|
||||
if (notification_manager != nullptr)
|
||||
notification_manager->set_in_preview(false);
|
||||
}
|
||||
//BBS: add slice logic when switch to preview page
|
||||
//BBS: add only gcode mode
|
||||
if (!q->only_gcode_mode() && (current_panel == preview) && (wxGetApp().is_editor())) {
|
||||
|
||||
Reference in New Issue
Block a user