diff --git a/AdaptiveBrightness/main_window.cpp b/AdaptiveBrightness/main_window.cpp index fba211d..15f56a9 100644 --- a/AdaptiveBrightness/main_window.cpp +++ b/AdaptiveBrightness/main_window.cpp @@ -342,10 +342,8 @@ bool MainWindow::setMonitorBrightness(float brightness) if(!m_monitors[i].driver.setBrightness(m_monitors[i].brightness)) { errorOccurred = true; } - else { - if(m_ui.monitorDropdown->currentIndex() == i) { - updateCurrentMonitorGUI(i); - } + else if(m_ui.monitorDropdown->currentIndex() == i) { + updateCurrentMonitorGUI(i); } }