# HG changeset patch # User cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1258677716 0 # Node ID e94cd7d1dab64b51c56a6664e758aebe201142c4 # Parent 3827b510546fe20e3e9736a81b18bd0e895ad146 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. diff -r 3827b510546f -r e94cd7d1dab6 clients/editor/plugins/ObjectSelector.py --- 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.