diff --git a/resources/forms/preferences.ui b/resources/forms/preferences.ui index 331aea8e..d5ba1c62 100644 --- a/resources/forms/preferences.ui +++ b/resources/forms/preferences.ui @@ -134,7 +134,7 @@ - Swap first and second displays + Swap first and second view displays diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index db5c1318..3d76ebb6 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -109,46 +109,7 @@ void UBDisplayManager::initScreenIndexes() void UBDisplayManager::swapDisplayScreens(bool swap) { - int screenCount = numScreens(); - - mScreenIndexesRoles.clear(); - - if (screenCount > 0) - { - mControlScreenIndex = mDesktop->primaryScreen(); - if (screenCount > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool()) - { - mControlScreenIndex = mControlScreenIndex^1; - } - mScreenIndexesRoles << Control; - } - else - { - mControlScreenIndex = -1; - } - - if (screenCount > 1 && mUseMultiScreen) - { - mDisplayScreenIndex = mControlScreenIndex != 0 ? 0 : 1; - mScreenIndexesRoles << Display; - } - else - { - mDisplayScreenIndex = -1; - } - - mPreviousScreenIndexes.clear(); - - if (screenCount > 2) - { - for(int i = 2; i < screenCount; i++) - { - if(mControlScreenIndex == i) - mPreviousScreenIndexes.append(1); - else - mPreviousScreenIndexes.append(i); - } - } + initScreenIndexes(); if (swap) {