]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
ensureItemVisible method has been added
authorsln <sln@opencascade.com>
Wed, 13 Dec 2006 12:33:54 +0000 (12:33 +0000)
committersln <sln@opencascade.com>
Wed, 13 Dec 2006 12:33:54 +0000 (12:33 +0000)
src/ObjBrowser/OB_Browser.cxx
src/ObjBrowser/OB_Browser.h

index 2456e168c96348fb54b67a02d2465ce97b2421f6..4b0b4840d5dbb1b07d1593327bf333e542f4e19f 100755 (executable)
@@ -1627,3 +1627,17 @@ void OB_Browser::setModified()
   myModifiedTime = clock();
 }
 
+/*!
+  Ensures that object obj is visible, scrolling the list view vertically 
+  if necessary and opening (expanding) any parent items if this is required to show the item. 
+*/
+void OB_Browser::ensureItemVisible( const SUIT_DataObject* obj )
+{
+  QListViewItem* item = listViewItem( obj );
+  if ( item )
+    listView()->ensureItemVisible( item );
+}
+
+
+
+
index 5dfb52b295bad2c1c65eeb078f14a3ec4a56b746..a190c586ebfc5bbae6e3d68d2b8671381a2494fb 100755 (executable)
@@ -128,6 +128,8 @@ public:
   void              setModified();
   unsigned long     getModifiedTime() { return myModifiedTime; }
 
+  void              ensureItemVisible( const SUIT_DataObject* );
+
 signals:
   void              selectionChanged();
   void              doubleClicked( SUIT_DataObject* );