mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 19:17:33 +00:00
Warn about mixed color sublayer when adding height ranges
This commit is contained in:
@@ -3233,6 +3233,24 @@ void ObjectList::merge(bool to_multipart_object)
|
|||||||
|
|
||||||
void ObjectList::layers_editing()
|
void ObjectList::layers_editing()
|
||||||
{
|
{
|
||||||
|
// Height ranges give each range its own layer height, varying the mixed sub-layer heights just
|
||||||
|
// like an adaptive profile; sibling of the on_action_layersediting/ConfigManipulation warnings,
|
||||||
|
// sharing the same do-not-show-again flag.
|
||||||
|
const auto& print_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||||
|
if (print_config.opt_bool("enable_mixed_color_sublayer")) {
|
||||||
|
if (wxGetApp().app_config->get("no_warn_mixed_sublayer_variable_layer") != "1") {
|
||||||
|
// Orca: parent to the plater like the sibling site in Plater::priv::on_action_layersediting
|
||||||
|
// (BBS passes nullptr, which MsgDialog remaps to the main frame).
|
||||||
|
MessageDialog dlg(wxGetApp().plater(),
|
||||||
|
_L("Using variable layer height together with mixed color sublayer may result in poor color mixing quality."),
|
||||||
|
_L("Warning"), wxICON_WARNING | wxOK);
|
||||||
|
dlg.show_dsa_button();
|
||||||
|
dlg.ShowModal();
|
||||||
|
if (dlg.get_checkbox_state())
|
||||||
|
wxGetApp().app_config->set("no_warn_mixed_sublayer_variable_layer", "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Selection& selection = scene_selection();
|
const Selection& selection = scene_selection();
|
||||||
const int obj_idx = selection.get_object_idx();
|
const int obj_idx = selection.get_object_idx();
|
||||||
wxDataViewItem item = obj_idx >= 0 && GetSelectedItemsCount() > 1 && selection.is_single_full_object() ?
|
wxDataViewItem item = obj_idx >= 0 && GetSelectedItemsCount() > 1 && selection.is_single_full_object() ?
|
||||||
|
|||||||
@@ -14077,8 +14077,8 @@ void Plater::priv::on_action_layersediting(SimpleEvent&)
|
|||||||
// Sub-layer splitting divides each layer by the mix ratio, so an adaptive layer profile makes
|
// Sub-layer splitting divides each layer by the mix ratio, so an adaptive layer profile makes
|
||||||
// those sub-layer heights vary and degrades the blend. ConfigManipulation warns when the
|
// those sub-layer heights vary and degrades the blend. ConfigManipulation warns when the
|
||||||
// option is switched on with a variable profile already present; this is the other direction,
|
// option is switched on with a variable profile already present; this is the other direction,
|
||||||
// warning when variable layer editing is switched on while the option is active. Both honour
|
// warning when variable layer editing is switched on while the option is active. All three
|
||||||
// the same do-not-show-again flag.
|
// sites (with ObjectList::layers_editing for height ranges) honour the same do-not-show-again flag.
|
||||||
if (!view3D->is_layers_editing_enabled()) {
|
if (!view3D->is_layers_editing_enabled()) {
|
||||||
const auto& print_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
const auto& print_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||||
if (print_config.opt_bool("enable_mixed_color_sublayer")) {
|
if (print_config.opt_bool("enable_mixed_color_sublayer")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user