@@ -14,10 +14,6 @@ FloatingPane {
1414 property real gammaDefaultValue: 1.0
1515 property string pixelCoordinatesPlaceholder: " --"
1616
17- function resetDefaultValues () {
18- gainCtrl .value = root .gainDefaultValue
19- gammaCtrl .value = root .gammaDefaultValue
20- }
2117
2218 property real slidersPowerValue: 4.0
2319 property real gainValue: Math .pow (gainCtrl .value , slidersPowerValue)
@@ -28,11 +24,25 @@ FloatingPane {
2824
2925 property bool colorPickerVisible: true
3026
31- property variant pixelX : null
32- property variant pixelY : null
27+ property variant userDefinedXPixel : null
28+ property variant userDefinedYPixel : null
3329
3430 background: Rectangle { color: root .palette .window }
3531
32+ function resetDefaultValues () {
33+ gainCtrl .value = root .gainDefaultValue
34+ gammaCtrl .value = root .gammaDefaultValue
35+ }
36+
37+ function resetPixelCoordinates () {
38+ if (userDefinedXPixel !== null ) { userDefinedXPixel = null }
39+ if (userDefinedYPixel !== null ) { userDefinedYPixel = null }
40+ }
41+
42+ onMousePositionChanged: {
43+ resetPixelCoordinates ()
44+ }
45+
3646 DoubleValidator {
3747 id: doubleValidator
3848 locale: ' C' // Use '.' decimal separator disregarding of the system locale
@@ -154,7 +164,7 @@ FloatingPane {
154164 validator: IntValidator {}
155165 onTextEdited: {
156166 const xPixelValue = parseInt (xPixel .text )
157- pixelX = Number .isNaN (xPixelValue) ? null : xPixelValue
167+ userDefinedXPixel = Number .isNaN (xPixelValue) ? null : xPixelValue
158168 }
159169 }
160170 Label {
@@ -168,7 +178,7 @@ FloatingPane {
168178 validator: IntValidator {}
169179 onTextEdited: {
170180 const yPixelValue = parseInt (yPixel .text )
171- pixelY = Number .isNaN (yPixelValue) ? null : yPixelValue
181+ userDefinedYPixel = Number .isNaN (yPixelValue) ? null : yPixelValue
172182 }
173183 }
174184
0 commit comments