mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-27 07:18:57 -06:00
Prevent a crash in the SGCT Editor when trying to add more than 2 windows on a computer with only 1 monitor
This commit is contained in:
@@ -49,7 +49,8 @@ void DisplayWindowUnion::createWidgets(int nMaxWindows,
|
||||
{
|
||||
// Add all window controls (some will be hidden from GUI initially)
|
||||
for (int i = 0; i < nMaxWindows; ++i) {
|
||||
const int monitorNumForThisWindow = (nMaxWindows > 3 && i >= 2) ? 1 : 0;
|
||||
const int monitorNumForThisWindow =
|
||||
(monitorResolutions.size() > 1 && i >= 2) ? 1 : 0;
|
||||
|
||||
WindowControl* ctrl = new WindowControl(
|
||||
monitorNumForThisWindow,
|
||||
|
||||
Reference in New Issue
Block a user