mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Fix setting visibility when searching
This commit is contained in:
parent
4a1f0a21ad
commit
dee70f35f4
1 changed files with 26 additions and 22 deletions
|
@ -384,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:
|
||||||
|
@ -395,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
|
||||||
|
@ -410,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
|
||||||
|
@ -446,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;
|
||||||
|
@ -458,14 +469,6 @@ Item {
|
||||||
{
|
{
|
||||||
id: definitionsModel;
|
id: definitionsModel;
|
||||||
containerId: Cura.MachineManager.activeDefinitionId
|
containerId: Cura.MachineManager.activeDefinitionId
|
||||||
filter:
|
|
||||||
{
|
|
||||||
if (printSequencePropertyProvider.properties.value == "one_at_a_time")
|
|
||||||
{
|
|
||||||
return {"settable_per_meshgroup": true};
|
|
||||||
}
|
|
||||||
return {"settable_per_mesh": true};
|
|
||||||
}
|
|
||||||
visibilityHandler: UM.SettingPreferenceVisibilityHandler {}
|
visibilityHandler: UM.SettingPreferenceVisibilityHandler {}
|
||||||
expanded: [ "*" ]
|
expanded: [ "*" ]
|
||||||
exclude:
|
exclude:
|
||||||
|
@ -497,6 +500,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Component.onCompleted: settingPickDialog.updateFilter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue