mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
[qt6][GraphEditor] Fix ColorDialog
selection
This commit is contained in:
parent
b9ec8fe3b7
commit
a62bed08eb
1 changed files with 7 additions and 4 deletions
|
@ -406,7 +406,10 @@ RowLayout {
|
||||||
text: "Custom Color"
|
text: "Custom Color"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
_reconstruction.setAttribute(attribute, "#0000FF")
|
if (colorText.text == "")
|
||||||
|
_reconstruction.setAttribute(attribute, "#0000FF")
|
||||||
|
else
|
||||||
|
_reconstruction.setAttribute(attribute, colorText.text)
|
||||||
} else {
|
} else {
|
||||||
_reconstruction.setAttribute(attribute, "")
|
_reconstruction.setAttribute(attribute, "")
|
||||||
}
|
}
|
||||||
|
@ -433,7 +436,7 @@ RowLayout {
|
||||||
width: colorText.width / 2
|
width: colorText.width / 2
|
||||||
Layout.alignment: Qt.AlignLeft
|
Layout.alignment: Qt.AlignLeft
|
||||||
visible: colorCheckbox.checked
|
visible: colorCheckbox.checked
|
||||||
color: colorCheckbox.checked ? attribute.value : ""
|
color: colorCheckbox.checked ? colorDialog.selectedColor : ""
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
enabled: root.editable
|
enabled: root.editable
|
||||||
|
@ -445,9 +448,9 @@ RowLayout {
|
||||||
ColorDialog {
|
ColorDialog {
|
||||||
id: colorDialog
|
id: colorDialog
|
||||||
title: "Please choose a color"
|
title: "Please choose a color"
|
||||||
selectedColor: attribute.value
|
selectedColor: colorText.text
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
colorText.text = color
|
colorText.text = colorDialog.selectedColor
|
||||||
// Artificially trigger change of attribute value
|
// Artificially trigger change of attribute value
|
||||||
colorText.editingFinished()
|
colorText.editingFinished()
|
||||||
close()
|
close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue