mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Merge branch '5.10' into PP-580-Improve-self-support
This commit is contained in:
commit
ec4a19c0e4
6 changed files with 21 additions and 3 deletions
|
@ -72,6 +72,13 @@ class ActiveIntentQualitiesModel(ListModel):
|
|||
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)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"author": "Ultimaker",
|
||||
"manufacturer": "Unknown",
|
||||
"position": "0",
|
||||
"setting_version": 24,
|
||||
"setting_version": 25,
|
||||
"type": "extruder"
|
||||
},
|
||||
"settings":
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -53,6 +53,7 @@ Item
|
|||
signal showTooltip(string text)
|
||||
signal hideTooltip()
|
||||
signal showAllHiddenInheritedSettings(string category_id)
|
||||
signal setScrollPositionChangeLoseFocus(bool lose_focus)
|
||||
|
||||
function createTooltipText()
|
||||
{
|
||||
|
|
|
@ -148,6 +148,11 @@ SettingItem
|
|||
if(activeFocus)
|
||||
{
|
||||
base.focusReceived();
|
||||
setScrollPositionChangeLoseFocus(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
setScrollPositionChangeLoseFocus(true);
|
||||
}
|
||||
base.focusGainedByClick = false;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ Item
|
|||
|
||||
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
|
||||
property bool findingSettings
|
||||
property bool loseFocusOnScrollPositionChange: true
|
||||
|
||||
Item
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -378,6 +379,10 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
function onSetScrollPositionChangeLoseFocus(lose_focus)
|
||||
{
|
||||
loseFocusOnScrollPositionChange = lose_focus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue