fixes #2219 when object is double clicked in rules to select it in the tree, the tree scrolls so that this object is at the top

This commit is contained in:
Vadim Kurland
2011-03-12 18:24:53 -08:00
parent 6b7d1f5806
commit 33070886db
+1 -1
View File
@@ -1256,7 +1256,7 @@ void ObjectManipulator::showObjectInTree(ObjectTreeViewItem *otvi)
m_objectManipulator->widgetStack->setCurrentWidget(otv);
otvi->getTree()->clearSelection();
otvi->getTree()->scrollToItem(otvi, QAbstractItemView::PositionAtTop);
otvi->getTree()->scrollToItem(otvi, QAbstractItemView::PositionAtCenter);
otvi->getTree()->setCurrentItem(otvi);
otvi->setSelected(true);
otvi->getTree()->setFocus(Qt::OtherFocusReason);