Merge branch '5.10' into CURA-12386_G-Code-replacement-fails-with-single-line-code

This commit is contained in:
HellAholic 2025-02-28 09:43:36 +01:00 committed by GitHub
commit 884983c34f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 1 deletions

View file

@ -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)

View file

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

View file

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

View file

@ -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;
}
}
}