Minor combo box fixes

This commit is contained in:
GriffinR
2025-05-01 15:52:36 -04:00
parent 8245f60e2b
commit 6d6b006620
2 changed files with 5 additions and 0 deletions

View File

@@ -2734,6 +2734,9 @@
</item>
<item>
<widget class="NoScrollComboBox" name="comboBox_EncounterGroupLabel">
<property name="editable">
<bool>false</bool>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::SizeAdjustPolicy::AdjustToContents</enum>
</property>

View File

@@ -496,6 +496,8 @@ void Editor::configureEncounterJSON(QWidget *window) {
QVBoxLayout *slotChoiceLayout = new QVBoxLayout;
if (useGroups) {
auto groupCombo = new NoScrollComboBox;
groupCombo->setEditable(false);
groupCombo->setMinimumContentsLength(10);
connect(groupCombo, QOverload<const QString &>::of(&QComboBox::textActivated), [&tempFields, &currentField, &updateTotal, index](QString newGroupName) {
for (EncounterField &field : tempFields) {
if (field.name == currentField.name) {