From 967fc3fe66ec918edc40bdc66cab8dcfef5749d3 Mon Sep 17 00:00:00 2001 From: Turanszki Janos Date: Thu, 8 Oct 2020 21:41:06 +0200 Subject: [PATCH] fix: gui combobox behaviour --- Editor/SoundWindow.cpp | 5 ++++- WickedEngine/wiVersion.cpp | 2 +- WickedEngine/wiWidget.cpp | 13 +++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Editor/SoundWindow.cpp b/Editor/SoundWindow.cpp index c268fc2fb..33153952d 100644 --- a/Editor/SoundWindow.cpp +++ b/Editor/SoundWindow.cpp @@ -240,7 +240,10 @@ void SoundWindow::SetEntity(Entity entity) playstopButton->SetText("Play"); } submixComboBox->SetEnabled(true); - submixComboBox->SetSelected((int)sound->soundinstance.type); + if (submixComboBox->GetSelected() != (int)sound->soundinstance.type) + { + submixComboBox->SetSelected((int)sound->soundinstance.type); + } } else { diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index cd2eb7587..dbe171472 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wiVersion // minor features, major updates, breaking API changes const int minor = 48; // minor bug fixes, alterations, refactors, updates - const int revision = 1; + const int revision = 2; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision); diff --git a/WickedEngine/wiWidget.cpp b/WickedEngine/wiWidget.cpp index 458080a86..51153f18f 100644 --- a/WickedEngine/wiWidget.cpp +++ b/WickedEngine/wiWidget.cpp @@ -1430,15 +1430,12 @@ void wiComboBox::SetMaxVisibleItemCount(int value) } void wiComboBox::SetSelected(int index) { - if (selected != index) - { - selected = index; + selected = index; - wiEventArgs args; - args.iValue = selected; - args.sValue = GetItemText(selected); - onSelect(args); - } + wiEventArgs args; + args.iValue = selected; + args.sValue = GetItemText(selected); + onSelect(args); } string wiComboBox::GetItemText(int index) const {