Browse Source

Prevent windows UI-element moving while it is being resized.
Fix #2114.

Yao Wei Tjong 姚伟忠 8 years ago
parent
commit
61d870b657
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/Urho3D/UI/Window.cpp

+ 2 - 1
Source/Urho3D/UI/Window.cpp

@@ -157,7 +157,8 @@ void Window::OnDragMove(const IntVector2& position, const IntVector2& screenPosi
 
     const IntVector2& position_ = GetPosition();
     const IntVector2& size_ = GetSize();
-    const IntVector2& minSize_ = GetMinSize();
+    // Use GetEffectiveMinSize() instead of GetMinSize() to prevent windows moving once the effective minimum size is reached
+    const IntVector2& minSize_ = GetEffectiveMinSize();
     const IntVector2& maxSize_ = GetMaxSize();
 
     switch (dragMode_)