Give the Design tab its own camera view

The Camera is Plater-owned and shared by every canvas, and Design sits
outside the panel switch that saves and restores it for Prepare,
Preview and Assemble — so orbiting in Design moved what the editor
tabs showed, and Design lost its own view on every switch. Trade the
live camera for a parked one on the way in and back on the way out, so
Design keeps its view the way Assemble already does.
This commit is contained in:
SoftFever
2026-08-28 01:05:01 +08:00
parent ba1df32e88
commit 806db473de
3 changed files with 49 additions and 2 deletions
+8 -2
View File
@@ -6937,12 +6937,18 @@ wxString DesignPanel::idle_hint() const
// Nothing else in the panel needs to know: the popup keeps its text and comes straight back.
void DesignPanel::on_tab_hidden()
{
if (m_viewport) m_viewport->show_status_hud(false);
if (m_viewport) {
m_viewport->show_status_hud(false);
m_viewport->leave_viewport(); // hand the shared camera back to the editor tabs
}
}
void DesignPanel::on_tab_shown()
{
if (m_viewport) m_viewport->show_status_hud(true); // ...and back on the way in
if (m_viewport) {
m_viewport->show_status_hud(true); // ...and back on the way in
m_viewport->enter_viewport(); // borrow the shared camera; on_tab_hidden gives it back
}
if (m_active == Tool::None && m_doc.display_mesh.its.indices.empty())
set_status(idle_hint()); // first paint: the tab has never been edited