From 99c30ce7b964a4ed2c8b9f53139821a56b2f9722 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Mon, 3 Feb 2020 16:48:30 -0300 Subject: [PATCH] When enabling a monitor, set a mode --- xrandroll/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xrandroll/main.py b/xrandroll/main.py index 3656257..55e0167 100644 --- a/xrandroll/main.py +++ b/xrandroll/main.py @@ -117,6 +117,10 @@ class Window(QObject): print(f"Setting {mon} enabled status to {enabled}") monitor = self.xrandr_info[mon] monitor["enabled"] = enabled + if enabled and not monitor["current_mode"]: + # Choose a mode + self.ui.modes.setCurrentIndex(0) + self.mode_changed() monitor["item"].update_visuals(monitor) def primary_changed(self):