Merge branch 'main' into belt/baseChanges

This commit is contained in:
Rodrigo Faselli
2026-06-04 17:32:35 -03:00
committed by GitHub
155 changed files with 26628 additions and 4804 deletions
+19
View File
@@ -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();
}
});