Commit 232a18f8 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Propertly show / hide the bitmask edit

Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 3adba8e2
...@@ -47,7 +47,6 @@ QGCViewDialog { ...@@ -47,7 +47,6 @@ QGCViewDialog {
QGCPalette { id: qgcPal; colorGroupEnabled: true } QGCPalette { id: qgcPal; colorGroupEnabled: true }
function accept() { function accept() {
/*
if (bitmaskEditor.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) {
...@@ -58,8 +57,9 @@ QGCViewDialog { ...@@ -58,8 +57,9 @@ QGCViewDialog {
} }
fact.value = value; fact.value = value;
fact.valueChanged(fact.value) fact.valueChanged(fact.value)
hideDialog();
} }
else */ if (factCombo.visible) { else if (factCombo.visible) {
fact.enumIndex = factCombo.currentIndex fact.enumIndex = factCombo.currentIndex
hideDialog() hideDialog()
} else { } else {
...@@ -152,10 +152,11 @@ QGCViewDialog { ...@@ -152,10 +152,11 @@ QGCViewDialog {
Column { Column {
spacing: ScreenTools.defaultFontPixelHeight / 2 spacing: ScreenTools.defaultFontPixelHeight / 2
visible: fact.bitmaskStrings.length > 0 ? true : false;
Repeater { Repeater {
id: bitmaskEditor id: bitmaskEditor
model: fact.bitmaskStrings model: fact.bitmaskStrings
delegate : QGCCheckBox { delegate : QGCCheckBox {
text : modelData text : modelData
checked : fact.value & fact.bitmaskValues[index] checked : fact.value & fact.bitmaskValues[index]
......
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