mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -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)
|
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)
|
||||||
|
|
||||||
|
|
|
@ -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":
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,6 +148,11 @@ SettingItem
|
||||||
if(activeFocus)
|
if(activeFocus)
|
||||||
{
|
{
|
||||||
base.focusReceived();
|
base.focusReceived();
|
||||||
|
setScrollPositionChangeLoseFocus(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setScrollPositionChangeLoseFocus(true);
|
||||||
}
|
}
|
||||||
base.focusGainedByClick = false;
|
base.focusGainedByClick = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue