Browse Source

Fixing tabbed title bar drag and drop issue where a tab would get lost into nothingness

Marko Pintera 12 years ago
parent
commit
d117adc85c
1 changed files with 8 additions and 1 deletions
  1. 8 1
      CamelotClient/Source/BsGUITabbedTitleBar.cpp

+ 8 - 1
CamelotClient/Source/BsGUITabbedTitleBar.cpp

@@ -139,7 +139,14 @@ namespace BansheeEditor
 
 					if((i + 1) == numTabButtons)
 					{
-						if(widgetRelPos.x >= centerX)
+						if(i == 0 && widgetRelPos.x <= centerX)
+						{
+							insertTab(0, draggedWidget->getName());
+							mTempDraggedTabIdx = mTabButtons[0]->getIndex();
+
+							break;
+						}
+						else if(widgetRelPos.x > centerX)
 						{
 							addTab(draggedWidget->getName());
 							mTempDraggedTabIdx = mTabButtons[i + 1]->getIndex();