changeset 372:e94cd7d1dab6

Changed some of the adaptLayout calls in object selector. This should fix the bug where the objectselector shrinks when a new object is selected. If previewmode is enabled or there are other heavy widgets attached to the root widget, there will probably be a brief lag while the widgets get updated.
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 20 Nov 2009 00:41:56 +0000
parents 3827b510546f
children 20fa29f376c7
files clients/editor/plugins/ObjectSelector.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/clients/editor/plugins/ObjectSelector.py	Fri Nov 20 00:03:39 2009 +0000
+++ b/clients/editor/plugins/ObjectSelector.py	Fri Nov 20 00:41:56 2009 +0000
@@ -298,8 +298,6 @@
 				self.objects.selected = i
 				break
 				
-				
-		self.mainScrollArea.adaptLayout(False)
 		scrollY = (self.objects.real_font.getHeight() + 0) * self.objects.selected
 		self.mainScrollArea.real_widget.setVerticalScrollAmount(scrollY)
 
@@ -334,9 +332,10 @@
 		if not self.object:
 			if len(objects) > 0:
 				self.objectSelected(objects[0])
-				
-		self.mainScrollArea.adaptLayout(False)
+		
 		self.mainScrollArea.real_widget.setVerticalScrollAmount(self.objects.selected_item.y)
+		
+		self.objects.adaptLayout(False)
 
 
 	def objectSelected(self, obj):
@@ -364,7 +363,7 @@
 		if height > 200: height = 200
 		self.preview.parent.max_height = height
 		
-		self.gui.adaptLayout(False)
+		self.gui.adaptLayout()
 		
 	def scrollToObject(self, object):
 		# Select namespace
@@ -397,7 +396,7 @@
 		elif self.mode == 'preview':
 			self.fillPreviewList()
 
-		self.gui.adaptLayout(False)
+		self.gui.adaptLayout()
 
 	def _getImage(self, obj):
 		""" Returns an image for the given object.