From 5204eb7828152cda3867f556e9e2b52ee1614abd Mon Sep 17 00:00:00 2001
From: Janus <janus2@ymail.com>
Date: Mon, 19 Jan 2015 10:07:46 +0000
Subject: [PATCH] Fix #4231
---
src/preferences/screen/ScreenWindow.cpp | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp
index 511ed9a..c3bfb28 100644
a
|
b
|
ScreenWindow::_BuildSupportedColorSpaces()
|
1215 | 1215 | void |
1216 | 1216 | ScreenWindow::_CheckApplyEnabled() |
1217 | 1217 | { |
1218 | | fApplyButton->SetEnabled(fSelected != fActive |
1219 | | || fAllWorkspacesItem->IsMarked()); |
| 1218 | bool applyEnabled = true; |
| 1219 | |
| 1220 | if (fSelected == fActive) { |
| 1221 | applyEnabled = false; |
| 1222 | if (fAllWorkspacesItem->IsMarked()) { |
| 1223 | screen_mode screenMode; |
| 1224 | const int32 workspaceCount = count_workspaces(); |
| 1225 | for (int32 i = 0; i < workspaceCount; i++) { |
| 1226 | fScreenMode.Get(screenMode, i); |
| 1227 | if (screenMode != fSelected) { |
| 1228 | applyEnabled = true; |
| 1229 | break; |
| 1230 | } |
| 1231 | } |
| 1232 | } |
| 1233 | } |
| 1234 | |
| 1235 | fApplyButton->SetEnabled(applyEnabled); |
1220 | 1236 | |
1221 | 1237 | uint32 columns; |
1222 | 1238 | uint32 rows; |
… |
… |
ScreenWindow::_Apply()
|
1337 | 1353 | |
1338 | 1354 | if (fAllWorkspacesItem->IsMarked()) { |
1339 | 1355 | int32 originatingWorkspace = current_workspace(); |
1340 | | for (int32 i = 0; i < count_workspaces(); i++) { |
| 1356 | const int32 workspaceCount = count_workspaces(); |
| 1357 | for (int32 i = 0; i < workspaceCount; i++) { |
1341 | 1358 | if (i != originatingWorkspace) |
1342 | 1359 | screen.SetMode(i, &newMode, true); |
1343 | 1360 | } |