Modified not to be added the invalid value except the defined orientation 15/166015/1
authorMoonhee Choi <mh0310.choi@samsung.com>
Fri, 5 Jan 2018 07:10:15 +0000 (16:10 +0900)
committerMoonhee Choi <mh0310.choi@samsung.com>
Fri, 5 Jan 2018 07:32:52 +0000 (16:32 +0900)
Change-Id: I7041e91401b9dc3193a3d59928a0c59c5c17f04a
Signed-off-by: Moonhee Choi <mh0310.choi@samsung.com>
adaptors/ecore/wayland/window-impl-ecore-wl.cpp

index 2c46991..ca805b5 100644 (file)
@@ -849,19 +849,22 @@ void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation
 {
   bool found = false;
 
-  for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
+  if ((orientation >= Dali::Window::PORTRAIT) && (orientation <= Dali::Window::LANDSCAPE_INVERSE))
   {
-    if(mAvailableOrientations[i] == orientation)
+    for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
     {
-      found = true;
-      break;
+      if(mAvailableOrientations[i] == orientation)
+      {
+        found = true;
+        break;
+      }
     }
-  }
 
-  if( ! found )
-  {
-    mAvailableOrientations.push_back(orientation);
-    SetAvailableOrientations( mAvailableOrientations );
+    if( ! found )
+    {
+      mAvailableOrientations.push_back(orientation);
+      SetAvailableOrientations( mAvailableOrientations );
+    }
   }
 }