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

Fix bitmask editing

parent 99db0a0c
......@@ -36,11 +36,10 @@ QGCViewDialog {
QGCPalette { id: qgcPal; colorGroupEnabled: true }
function accept() {
/*
if (bitmaskEditor.visible) {
if (bitmaskColumn.visible) {
var value = 0;
for (var i = 0; i < fact.bitmaskValues.length; ++i) {
var checkbox = bitmaskEditor.itemAt(i)
var checkbox = bitmaskRepeater.itemAt(i)
if (checkbox.checked) {
value |= fact.bitmaskValues[i];
}
......@@ -48,8 +47,7 @@ QGCViewDialog {
fact.value = value;
fact.valueChanged(fact.value)
hideDialog();
}
else */ if (factCombo.visible) {
} else if (factCombo.visible) {
fact.enumIndex = factCombo.currentIndex
hideDialog()
} else {
......@@ -142,11 +140,13 @@ QGCViewDialog {
}
Column {
spacing: ScreenTools.defaultFontPixelHeight / 2
visible: fact.bitmaskStrings.length > 0 ? true : false;
id: bitmaskColumn
spacing: ScreenTools.defaultFontPixelHeight / 2
visible: fact.bitmaskStrings.length > 0 ? true : false;
Repeater {
id: bitmaskEditor
model: fact.bitmaskStrings
id: bitmaskRepeater
model: fact.bitmaskStrings
delegate : QGCCheckBox {
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