mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Due to collapsing pop-ups on scrollbar change fix, textfields also lost focus.
CURA-12254
This commit is contained in:
parent
667a27e2d2
commit
64cdb31252
3 changed files with 12 additions and 1 deletions
|
@ -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