Skip to content

Commit

Permalink
Merge branch '5.10' into PP-580-Improve-self-support
Browse files Browse the repository at this point in the history
  • Loading branch information
HellAholic authored Feb 28, 2025
2 parents 8aacf63 + 9ac0f11 commit ec4a19c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
7 changes: 7 additions & 0 deletions cura/Machines/Models/ActiveIntentQualitiesModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ def _update(self):
new_items.append(intent)
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"])
self.setItems(new_items)

Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/fdmextruder.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "Ultimaker",
"manufacturer": "Unknown",
"position": "0",
"setting_version": 24,
"setting_version": 25,
"type": "extruder"
},
"settings":
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "machine",
"author": "Unknown",
"manufacturer": "Unknown",
"setting_version": 24,
"setting_version": 25,
"file_formats": "text/x-gcode;model/stl;application/x-wavefront-obj;application/x3g",
"visible": false,
"has_materials": true,
Expand Down
1 change: 1 addition & 0 deletions resources/qml/Settings/SettingItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Item
signal showTooltip(string text)
signal hideTooltip()
signal showAllHiddenInheritedSettings(string category_id)
signal setScrollPositionChangeLoseFocus(bool lose_focus)

function createTooltipText()
{
Expand Down
5 changes: 5 additions & 0 deletions resources/qml/Settings/SettingTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ SettingItem
if(activeFocus)
{
base.focusReceived();
setScrollPositionChangeLoseFocus(false);
}
else
{
setScrollPositionChangeLoseFocus(true);
}
base.focusGainedByClick = false;
}
Expand Down
7 changes: 6 additions & 1 deletion resources/qml/Settings/SettingView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Item

property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
property bool findingSettings
property bool loseFocusOnScrollPositionChange: true

Item
{
Expand Down Expand Up @@ -195,7 +196,7 @@ Item
onPositionChanged: {
// This removes focus from items when scrolling.
// This fixes comboboxes staying open and scrolling container
if (!activeFocus && !filter.activeFocus) {
if (!activeFocus && !filter.activeFocus && loseFocusOnScrollPositionChange) {
forceActiveFocus();
}
}
Expand Down Expand Up @@ -378,6 +379,10 @@ Item
}
}
}
function onSetScrollPositionChangeLoseFocus(lose_focus)
{
loseFocusOnScrollPositionChange = lose_focus;
}
}
}

Expand Down

0 comments on commit ec4a19c

Please sign in to comment.