mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 09:45:56 +08:00
Merge pull request #3154 from fieldOfView/fix_per_meshgroup_settings
Enable setting per mesh group settings when printing One at a Time
This commit is contained in:
commit
f2512a92a7
@ -163,7 +163,16 @@ Item {
|
|||||||
id: addedSettingsModel;
|
id: addedSettingsModel;
|
||||||
containerId: Cura.MachineManager.activeDefinitionId
|
containerId: Cura.MachineManager.activeDefinitionId
|
||||||
expanded: [ "*" ]
|
expanded: [ "*" ]
|
||||||
exclude: {
|
filter:
|
||||||
|
{
|
||||||
|
if (printSequencePropertyProvider.properties.value == "one_at_a_time")
|
||||||
|
{
|
||||||
|
return {"settable_per_meshgroup": true};
|
||||||
|
}
|
||||||
|
return {"settable_per_mesh": true};
|
||||||
|
}
|
||||||
|
exclude:
|
||||||
|
{
|
||||||
var excluded_settings = [ "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ];
|
var excluded_settings = [ "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ];
|
||||||
|
|
||||||
if(meshTypeSelection.model.get(meshTypeSelection.currentIndex).type == "support_mesh")
|
if(meshTypeSelection.model.get(meshTypeSelection.currentIndex).type == "support_mesh")
|
||||||
@ -375,7 +384,6 @@ Item {
|
|||||||
title: catalog.i18nc("@title:window", "Select Settings to Customize for this model")
|
title: catalog.i18nc("@title:window", "Select Settings to Customize for this model")
|
||||||
width: screenScaleFactor * 360
|
width: screenScaleFactor * 360
|
||||||
|
|
||||||
property string labelFilter: ""
|
|
||||||
property var additional_excluded_settings
|
property var additional_excluded_settings
|
||||||
|
|
||||||
onVisibilityChanged:
|
onVisibilityChanged:
|
||||||
@ -386,11 +394,33 @@ Item {
|
|||||||
// Set skip setting, it will prevent from resetting selected mesh_type
|
// Set skip setting, it will prevent from resetting selected mesh_type
|
||||||
contents.model.visibilityHandler.addSkipResetSetting(meshTypeSelection.model.get(meshTypeSelection.currentIndex).type)
|
contents.model.visibilityHandler.addSkipResetSetting(meshTypeSelection.model.get(meshTypeSelection.currentIndex).type)
|
||||||
listview.model.forceUpdate()
|
listview.model.forceUpdate()
|
||||||
|
|
||||||
|
updateFilter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateFilter()
|
||||||
|
{
|
||||||
|
var new_filter = {};
|
||||||
|
if (printSequencePropertyProvider.properties.value == "one_at_a_time")
|
||||||
|
{
|
||||||
|
new_filter["settable_per_meshgroup"] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
new_filter["settable_per_mesh"] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(filterInput.text != "")
|
||||||
|
{
|
||||||
|
new_filter["i18n_label"] = "*" + filterInput.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview.model.filter = new_filter;
|
||||||
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: filter
|
id: filterInput
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
@ -401,17 +431,7 @@ Item {
|
|||||||
|
|
||||||
placeholderText: catalog.i18nc("@label:textbox", "Filter...");
|
placeholderText: catalog.i18nc("@label:textbox", "Filter...");
|
||||||
|
|
||||||
onTextChanged:
|
onTextChanged: settingPickDialog.updateFilter()
|
||||||
{
|
|
||||||
if(text != "")
|
|
||||||
{
|
|
||||||
listview.model.filter = {"settable_per_mesh": true, "i18n_label": "*" + text}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
listview.model.filter = {"settable_per_mesh": true}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox
|
CheckBox
|
||||||
@ -437,7 +457,7 @@ Item {
|
|||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: filter.bottom;
|
top: filterInput.bottom;
|
||||||
left: parent.left;
|
left: parent.left;
|
||||||
right: parent.right;
|
right: parent.right;
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
@ -449,10 +469,6 @@ Item {
|
|||||||
{
|
{
|
||||||
id: definitionsModel;
|
id: definitionsModel;
|
||||||
containerId: Cura.MachineManager.activeDefinitionId
|
containerId: Cura.MachineManager.activeDefinitionId
|
||||||
filter:
|
|
||||||
{
|
|
||||||
"settable_per_mesh": true
|
|
||||||
}
|
|
||||||
visibilityHandler: UM.SettingPreferenceVisibilityHandler {}
|
visibilityHandler: UM.SettingPreferenceVisibilityHandler {}
|
||||||
expanded: [ "*" ]
|
expanded: [ "*" ]
|
||||||
exclude:
|
exclude:
|
||||||
@ -484,6 +500,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Component.onCompleted: settingPickDialog.updateFilter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,6 +524,16 @@ Item {
|
|||||||
storeIndex: 0
|
storeIndex: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UM.SettingPropertyProvider
|
||||||
|
{
|
||||||
|
id: printSequencePropertyProvider
|
||||||
|
|
||||||
|
containerStackId: Cura.MachineManager.activeMachineId
|
||||||
|
key: "print_sequence"
|
||||||
|
watchedProperties: [ "value" ]
|
||||||
|
storeIndex: 0
|
||||||
|
}
|
||||||
|
|
||||||
SystemPalette { id: palette; }
|
SystemPalette { id: palette; }
|
||||||
|
|
||||||
Component
|
Component
|
||||||
|
Loading…
x
Reference in New Issue
Block a user