mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-13 10:51:12 +00:00
Merge branch 'main' into belt/baseChanges
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user