diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index d0afd8e295..3413266b8e 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -481,6 +481,25 @@ void ObjectList::create_objects_ctrl() // Trigger the editor opening manually this->EditItem(event.GetItem(), GetColumn(colFilament)); #endif + return; + } + + // Double-clicking an object/part/instance row frames it in the 3D view, + // matching the "Fit camera to scene or selected object" canvas button. + // The preceding single click has already synced the canvas selection via + // wxEVT_DATAVIEW_SELECTION_CHANGED, so we just trigger the zoom here. + // No-op in slice-preview mode: the camera is shared with the editor + // canvas, so zooming there would move the preview view too — and the + // preview canvas's own toolbar button intentionally resets to the bed. + const wxDataViewItem item = event.GetItem(); + if (!item.IsOk()) + return; + if (wxGetApp().plater()->is_preview_shown()) + return; + const ItemType type = m_objects_model->GetItemType(item); + if (type & (itObject | itVolume | itInstance)) { + if (GLCanvas3D* canvas = wxGetApp().plater()->get_current_canvas3D()) + canvas->zoom_to_selection(); } });