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:
yw4z
2026-05-09 08:11:26 +03:00
committed by GitHub
parent 7aed2dc8bd
commit a29d4fc495
2 changed files with 40 additions and 7 deletions

View File

@@ -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())) {