Commit 8e0e785b authored by Don Gagne's avatar Don Gagne

Fix bitmask editing

parent 99db0a0c
...@@ -36,11 +36,10 @@ QGCViewDialog { ...@@ -36,11 +36,10 @@ QGCViewDialog {
QGCPalette { id: qgcPal; colorGroupEnabled: true } QGCPalette { id: qgcPal; colorGroupEnabled: true }
function accept() { function accept() {
/* if (bitmaskColumn.visible) {
if (bitmaskEditor.visible) {
var value = 0; var value = 0;
for (var i = 0; i < fact.bitmaskValues.length; ++i) { for (var i = 0; i < fact.bitmaskValues.length; ++i) {
var checkbox = bitmaskEditor.itemAt(i) var checkbox = bitmaskRepeater.itemAt(i)
if (checkbox.checked) { if (checkbox.checked) {
value |= fact.bitmaskValues[i]; value |= fact.bitmaskValues[i];
} }
...@@ -48,8 +47,7 @@ QGCViewDialog { ...@@ -48,8 +47,7 @@ QGCViewDialog {
fact.value = value; fact.value = value;
fact.valueChanged(fact.value) fact.valueChanged(fact.value)
hideDialog(); hideDialog();
} } else if (factCombo.visible) {
else */ if (factCombo.visible) {
fact.enumIndex = factCombo.currentIndex fact.enumIndex = factCombo.currentIndex
hideDialog() hideDialog()
} else { } else {
...@@ -142,11 +140,13 @@ QGCViewDialog { ...@@ -142,11 +140,13 @@ QGCViewDialog {
} }
Column { Column {
spacing: ScreenTools.defaultFontPixelHeight / 2 id: bitmaskColumn
visible: fact.bitmaskStrings.length > 0 ? true : false; spacing: ScreenTools.defaultFontPixelHeight / 2
visible: fact.bitmaskStrings.length > 0 ? true : false;
Repeater { Repeater {
id: bitmaskEditor id: bitmaskRepeater
model: fact.bitmaskStrings model: fact.bitmaskStrings
delegate : QGCCheckBox { delegate : QGCCheckBox {
text : modelData text : modelData
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment