summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 491735a..b0e2372 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -336,7 +336,7 @@ void Widget::initControls(bool jumpToTab)
// Determine preferred resolution for cloning: If no screen is detected as projector,
// use the smallest prefered resolution across all screens
// Otherwise, use the prefered resolution of the first projector we encounter
- QSize preferredClone;
+ QSize preferredClone, currentClone;
for (const auto &screen : screenList) {
if (!screen.preferredResolution.isEmpty()) {
if (screen.isProjector // Projector always overrides
@@ -344,6 +344,7 @@ void Widget::initControls(bool jumpToTab)
|| screen.preferredResolution.width() < preferredClone.width() // For normal screens,
|| screen.preferredResolution.height() < preferredClone.height()) { // smallest wins
preferredClone = screen.preferredResolution;
+ currentClone = screen.currentResolution;
}
if (screen.isProjector)
break;
@@ -352,7 +353,7 @@ void Widget::initControls(bool jumpToTab)
if (screenList.empty()) {
fillCombo(_ui->cboCloneResolution, modes, QSize(), preferredClone);
} else {
- fillCombo(_ui->cboCloneResolution, modes, screenList[0].currentResolution, preferredClone);
+ fillCombo(_ui->cboCloneResolution, modes, currentClone, preferredClone);
}
// Dual
_ui->dualContainer->takeAt(0);