diff options
author | Ken Moore <ken@ixsystems.com> | 2017-08-22 14:26:49 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-08-22 14:26:49 -0400 |
commit | 810a6cced9efcfd156d9156780e8f7e65a850cc2 (patch) | |
tree | df89154177957fe7f11f0617364149b43be47b3f /src-qt5 | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-810a6cced9efcfd156d9156780e8f7e65a850cc2.tar.gz lumina-810a6cced9efcfd156d9156780e8f7e65a850cc2.tar.bz2 lumina-810a6cced9efcfd156d9156780e8f7e65a850cc2.zip |
Fix a list which was not getting populated properly.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp index f962f7d7..3c0edc76 100644 --- a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp +++ b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp @@ -91,6 +91,7 @@ QList<ScreenInfo> RRSettings::PreviousSettings(QString profile){ QStringList avail; for(int i=0; i<screens.length(); i++){ if(devs.contains(screens[i].ID) && screens[i].isavailable){ //only load settings for monitors which are currently attached + avail << screens[i].ID; //currently available set.beginGroup(screens[i].ID); screens[i].geom = set.value("geometry", QRect()).toRect(); screens[i].isprimary = set.value("isprimary", false).toBool(); @@ -114,7 +115,7 @@ QList<ScreenInfo> RRSettings::PreviousSettings(QString profile){ QStringList filter = avail.filter(priority[i]); if(!filter.isEmpty()){ filter.sort(); primary = filter.first(); } } - if(primary.isEmpty()){ primary = avail.first(); } + if(primary.isEmpty() && !avail.isEmpty()){ primary = avail.first(); } } //Ensure only one monitor is primary, and reset a few flags for(int i=0; i<screens.length(); i++){ |