Skip to content

Commit

Permalink
Qt+extcap: editselect value fixups.
Browse files Browse the repository at this point in the history
Fix our value handling.
  • Loading branch information
geraldcombs committed Oct 9, 2022
1 parent 8065655 commit a820b43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/qt/extcap_argument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ QString ExtArgEditSelector::value()
return QString();
}

if (boxSelection->currentIndex() > -1) {
return ExtArgSelector::value();
}

return boxSelection->currentText();
}

Expand All @@ -298,12 +302,11 @@ void ExtArgEditSelector::setDefaultValue()
QVariant data = boxSelection->currentData();

if (data.toString() != stored) {
// Apparently createEditor hasn't been called at this point.
// createEditor may not have been called at this point?
boxSelection->setEditable(true);
boxSelection->setInsertPolicy(QComboBox::NoInsert);
boxSelection->setEditText(stored);
}

}


Expand Down

0 comments on commit a820b43

Please sign in to comment.