mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +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"
|
||||
onClicked: {
|
||||
if (checked) {
|
||||
_reconstruction.setAttribute(attribute, "#0000FF")
|
||||
if (colorText.text == "")
|
||||
_reconstruction.setAttribute(attribute, "#0000FF")
|
||||
else
|
||||
_reconstruction.setAttribute(attribute, colorText.text)
|
||||
} else {
|
||||
_reconstruction.setAttribute(attribute, "")
|
||||
}
|
||||
|
@ -433,7 +436,7 @@ RowLayout {
|
|||
width: colorText.width / 2
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
visible: colorCheckbox.checked
|
||||
color: colorCheckbox.checked ? attribute.value : ""
|
||||
color: colorCheckbox.checked ? colorDialog.selectedColor : ""
|
||||
|
||||
MouseArea {
|
||||
enabled: root.editable
|
||||
|
@ -445,9 +448,9 @@ RowLayout {
|
|||
ColorDialog {
|
||||
id: colorDialog
|
||||
title: "Please choose a color"
|
||||
selectedColor: attribute.value
|
||||
selectedColor: colorText.text
|
||||
onAccepted: {
|
||||
colorText.text = color
|
||||
colorText.text = colorDialog.selectedColor
|
||||
// Artificially trigger change of attribute value
|
||||
colorText.editingFinished()
|
||||
close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue