Fixed bug where ComboBox didn't match current effect

Fixed a bug where the GUI ComboBox value would sometimes not match the
effect being displayed. This bug sometimes occurs when the GUI is first
initialized. This change now ensures that the ComboBox value is
correctly initialized.
This commit is contained in:
Scott Lawson 2017-01-01 13:12:38 -07:00
parent c725d395be
commit 46b404120f
1 changed files with 1 additions and 0 deletions

View File

@ -277,6 +277,7 @@ if __name__ == '__main__':
def effect_change():
global visualization_effect
visualization_effect = effect_combobox.value()
effect_combobox.setValue(visualization_effect)
effect_combobox.currentIndexChanged.connect(effect_change)
GUI.layout.addWidget(effect_combobox)
# Initialize LEDs