Merge branch '5.10' into PP-580-Improve-self-support

This commit is contained in:
HellAholic 2025-02-28 09:31:43 +01:00 committed by GitHub
commit ec4a19c0e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 3 deletions

View file

@ -72,6 +72,13 @@ class ActiveIntentQualitiesModel(ListModel):
new_items.append(intent) new_items.append(intent)
added_quality_type_set.add(intent["quality_type"]) added_quality_type_set.add(intent["quality_type"])
# If there aren't any possibilities when the Intent is kept the same, attempt to set it 'back' to default.
current_quality_type = global_stack.quality.getMetaDataEntry("quality_type")
if len(new_items) == 0 and self._intent_category != "default" and current_quality_type != "not_supported":
IntentManager.getInstance().selectIntent("default", current_quality_type)
self._update()
return
new_items = sorted(new_items, key=lambda x: x["layer_height"]) new_items = sorted(new_items, key=lambda x: x["layer_height"])
self.setItems(new_items) self.setItems(new_items)

View file

@ -7,7 +7,7 @@
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Unknown", "manufacturer": "Unknown",
"position": "0", "position": "0",
"setting_version": 24, "setting_version": 25,
"type": "extruder" "type": "extruder"
}, },
"settings": "settings":

View file

@ -6,7 +6,7 @@
"type": "machine", "type": "machine",
"author": "Unknown", "author": "Unknown",
"manufacturer": "Unknown", "manufacturer": "Unknown",
"setting_version": 24, "setting_version": 25,
"file_formats": "text/x-gcode;model/stl;application/x-wavefront-obj;application/x3g", "file_formats": "text/x-gcode;model/stl;application/x-wavefront-obj;application/x3g",
"visible": false, "visible": false,
"has_materials": true, "has_materials": true,

View file

@ -53,6 +53,7 @@ Item
signal showTooltip(string text) signal showTooltip(string text)
signal hideTooltip() signal hideTooltip()
signal showAllHiddenInheritedSettings(string category_id) signal showAllHiddenInheritedSettings(string category_id)
signal setScrollPositionChangeLoseFocus(bool lose_focus)
function createTooltipText() function createTooltipText()
{ {

View file

@ -148,6 +148,11 @@ SettingItem
if(activeFocus) if(activeFocus)
{ {
base.focusReceived(); base.focusReceived();
setScrollPositionChangeLoseFocus(false);
}
else
{
setScrollPositionChangeLoseFocus(true);
} }
base.focusGainedByClick = false; base.focusGainedByClick = false;
} }

View file

@ -15,6 +15,7 @@ Item
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel() property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
property bool findingSettings property bool findingSettings
property bool loseFocusOnScrollPositionChange: true
Item Item
{ {
@ -195,7 +196,7 @@ Item
onPositionChanged: { onPositionChanged: {
// This removes focus from items when scrolling. // This removes focus from items when scrolling.
// This fixes comboboxes staying open and scrolling container // This fixes comboboxes staying open and scrolling container
if (!activeFocus && !filter.activeFocus) { if (!activeFocus && !filter.activeFocus && loseFocusOnScrollPositionChange) {
forceActiveFocus(); forceActiveFocus();
} }
} }
@ -378,6 +379,10 @@ Item
} }
} }
} }
function onSetScrollPositionChangeLoseFocus(lose_focus)
{
loseFocusOnScrollPositionChange = lose_focus;
}
} }
} }