ENH: some fix of previous patch

some fix to
Ib37896f9101d93ca63c7edb0b1e6328045a5ddb3
I4b5c8e158b073b302db6faad77bb8ca0f70f766a

Change-Id: Iec62a4df45159bac3db63c48feef16ec1aa35ae7
(cherry picked from commit 6fb06eb7790c1469d433f5ecec97d5be966e94af)
This commit is contained in:
zhimin.zeng 2024-12-12 18:10:42 +08:00 committed by Noisyfox
parent bd178d9369
commit c77be9cf3b
2 changed files with 21 additions and 0 deletions

View file

@ -874,6 +874,7 @@ public:
bool is_support_air_print_detection{false};
bool is_support_agora{false};
bool is_support_upgrade_kit{false};
bool is_support_filament_setting_inprinting{false};
bool is_support_command_homing { false };// fun[32]
bool installed_upgrade_kit{false};

View file

@ -6050,6 +6050,26 @@ void ObjectList::toggle_printable_state()
wxGetApp().plater()->reload_paint_after_background_process_apply();
}
void ObjectList::enable_layers_editing()
{
wxDataViewItemArray sels;
GetSelections(sels);
if (sels.IsEmpty())
return;
wxDataViewItem frst_item = sels[0];
ItemType type = m_objects_model->GetItemType(frst_item);
if (!(type & itObject))
return;
//take_snapshot("");
auto view3d = wxGetApp().plater()->get_view3D_canvas3D();
if (view3d != nullptr && m_objects_model->IsVariableHeight(frst_item)){
view3d->enable_layers_editing(true);
}
}
ModelObject* ObjectList::object(const int obj_idx) const
{
if (obj_idx < 0)