diff --git a/src/lib/gui/config/Screen.h b/src/lib/gui/config/Screen.h index a877a1070..5a261a8f9 100644 --- a/src/lib/gui/config/Screen.h +++ b/src/lib/gui/config/Screen.h @@ -133,9 +133,9 @@ protected: { m_Aliases.append(alias); } - void setSwitchCorner(int c, bool on) + void setSwitchCorner(SwitchCorner c, bool on) { - m_SwitchCorners[c] = on; + m_SwitchCorners[static_cast(c)] = on; } QList &switchCorners() { diff --git a/src/lib/gui/dialogs/ScreenSettingsDialog.cpp b/src/lib/gui/dialogs/ScreenSettingsDialog.cpp index 1ab6fe3f2..9f7c33c5a 100644 --- a/src/lib/gui/dialogs/ScreenSettingsDialog.cpp +++ b/src/lib/gui/dialogs/ScreenSettingsDialog.cpp @@ -102,10 +102,10 @@ void ScreenSettingsDialog::accept() m_pScreen->setModifier(Meta, ui_->m_pComboBoxMeta->currentIndex()); m_pScreen->setModifier(Super, ui_->m_pComboBoxSuper->currentIndex()); - m_pScreen->setSwitchCorner(static_cast(TopLeft), ui_->m_pCheckBoxCornerTopLeft->isChecked()); - m_pScreen->setSwitchCorner(static_cast(TopRight), ui_->m_pCheckBoxCornerTopRight->isChecked()); - m_pScreen->setSwitchCorner(static_cast(BottomLeft), ui_->m_pCheckBoxCornerBottomLeft->isChecked()); - m_pScreen->setSwitchCorner(static_cast(BottomRight), ui_->m_pCheckBoxCornerBottomRight->isChecked()); + m_pScreen->setSwitchCorner(TopLeft, ui_->m_pCheckBoxCornerTopLeft->isChecked()); + m_pScreen->setSwitchCorner(TopRight, ui_->m_pCheckBoxCornerTopRight->isChecked()); + m_pScreen->setSwitchCorner(BottomLeft, ui_->m_pCheckBoxCornerBottomLeft->isChecked()); + m_pScreen->setSwitchCorner(BottomRight, ui_->m_pCheckBoxCornerBottomRight->isChecked()); m_pScreen->setSwitchCornerSize(ui_->m_pSpinBoxSwitchCornerSize->value()); m_pScreen->setFix(static_cast(CapsLock), ui_->m_pCheckBoxCapsLock->isChecked());