]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
added public updateItem( SUIT_DataObject* object) to update the item display without...
authoravo <avo@opencascade.com>
Thu, 26 Dec 2013 06:10:32 +0000 (06:10 +0000)
committeravo <avo@opencascade.com>
Thu, 26 Dec 2013 06:10:32 +0000 (06:10 +0000)
src/SUIT/SUIT_TreeModel.cxx
src/SUIT/SUIT_TreeModel.h

index 95ccb9e6b83570be8fdd687c88f745dfd847914c..e8e38e1790c61055565d8783050160939e0a4ad2 100755 (executable)
@@ -1230,6 +1230,16 @@ void SUIT_TreeModel::updateItem( SUIT_TreeModel::TreeItem* item )
   emit dataChanged( firstIdx, lastIdx );
 }
 
+void SUIT_TreeModel::updateItem( SUIT_DataObject* obj)
+{
+  if(obj)
+  {
+    QModelIndex firstIdx = index( obj, 0 );
+    QModelIndex lastIdx  = index( obj, columnCount() - 1 );
+    emit dataChanged( firstIdx, lastIdx );
+  }
+}
+
 /*!
   \brief Remove tree item (recursively).
   \param item tree item to be removed
index 9d1d7a0cb61325ccb08ae19d5e65dc02d581cafa..94d336091ba2ff0e63c0b7b565658c7ca7c24d18 100755 (executable)
@@ -151,7 +151,9 @@ public:
                              int row, int column, const QModelIndex& parent );
   bool                     getObjects( const QMimeData* data, QList<SUIT_DataObject*>& ) const;
   void                     setDropAccepted( const bool );
-  
+
+  void                     updateItem( SUIT_DataObject* object);
+
 public slots:
   virtual void           updateTree( const QModelIndex& );
   virtual void           updateTree( SUIT_DataObject* = 0 );