From 17622e913981a45b1416b11430f36a723bcbeb72 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 4 May 2020 08:50:57 +0100 Subject: [PATCH] Projucer: Fixed a bug recalling iOS orientation settings --- .../ProjectSaving/jucer_ProjectExport_Xcode.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index f4990c5a2c..37310d1f2c 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -3202,11 +3202,15 @@ private: if (settingsString.contains ("portrait")) orientations.add ("UIInterfaceOrientationPortrait"); if (settingsString.contains ("landscape")) orientations.addArray ({ "UIInterfaceOrientationLandscapeLeft", - "UIInterfaceOrientationLandscapeRight" }); - if (i == 0) - iPhoneScreenOrientationValue = orientations; - else - iPadScreenOrientationValue = orientations; + "UIInterfaceOrientationLandscapeRight" }); + + if (! orientations.isEmpty()) + { + if (i == 0) + iPhoneScreenOrientationValue = orientations; + else + iPadScreenOrientationValue = orientations; + } } } }