mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 20:02:17 +00:00
* Restore SVG/text→Support crash guard (#5070), disable change_part_type() The crash fix from #5070 prevented converting SVG/text modifiers to Support Blocker / Support Enforcer by hiding those entries in the old SingleChoiceDialog opened from ObjectList::change_part_type(). When the "Change type" UI was reworked into a submenu that calls ObjectList::set_volume_type() directly, the guard was left behind in the unused change_part_type() path -- the submenu path had no protection, silently reintroducing the #5070 crash on the submenu route (ModelVolume::set_type() does not clear text_configuration / emboss_shape, so the stale emboss state stays attached to a support volume). - Guard set_volume_type(): reject SUPPORT_BLOCKER / SUPPORT_ENFORCER when any selected volume is SVG or text, showing the same error as before. - Wrap ObjectList::change_part_type() in #if 0 instead of deleting it: the function is unused since the submenu rework, but keeping it in commented-out form preserves traceability with upstream Bambu Studio (avoids merge conflicts on each BBL sync). Suggested by RF47, confirmed by ianalexis. * Log instead of showing user error; action guard is defense-in-depth only Per review feedback from RF47: with the UI-side guard in #13120, the set_volume_type() action-time check is a pure safety net -- a healthy UI should never let the user reach it. Showing a modal error dialog would therefore either confuse a user who did nothing wrong (if the UI guard is bypassed by a future refactor/plugin/shortcut) or be dead code at runtime. Log the event for developers instead, keep the early return so the crash is still prevented.
This commit is contained in:
@@ -413,7 +413,9 @@ public:
|
||||
bool fix_cut_selection(wxDataViewItemArray &sels);
|
||||
|
||||
ModelVolume* get_selected_model_volume();
|
||||
#if 0 // ORCA: disabled alongside definition in GUI_ObjectList.cpp (see #if 0 block there)
|
||||
void change_part_type();
|
||||
#endif
|
||||
void set_volume_type(ModelVolumeType new_type);
|
||||
ModelVolumeType get_selected_volume_type();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user