]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug IPAL19264 - Qt4 porting. Application crashes after deletion of all entities of...
authorouv <ouv@opencascade.com>
Mon, 21 Apr 2008 16:23:50 +0000 (16:23 +0000)
committerouv <ouv@opencascade.com>
Mon, 21 Apr 2008 16:23:50 +0000 (16:23 +0000)
src/Qtx/QtxTreeView.cxx
src/Qtx/QtxTreeView.h

index 09100e5a7937dc0204751d1ebdc6cf399c6b5fca..c1dfc56b91b6a7cdf14f352880ae2fedb311f22b 100644 (file)
@@ -295,6 +295,18 @@ void QtxTreeView::selectionChanged( const QItemSelection& selected,
   emit( selectionChanged() );
 }
 
+/*!
+  \brief Called when rows are about to be removed.
+  \param parent model index
+  \param start first row to remove
+  \param end last row to remove
+*/
+void QtxTreeView::rowsAboutToBeRemoved( const QModelIndex& parent, int start, int end )
+{
+  setCurrentIndex( QModelIndex() );
+  QTreeView::rowsAboutToBeRemoved( parent, start, end );
+}
+
 /*!
   \brief Expand/collapse the specified item (recursively).
   \param index model index
index 4d5935f8de30cc7596c37f6f55c5884e4c343e8e..be10077a465e54c40c5d4b9833508111b703db97 100644 (file)
@@ -53,6 +53,7 @@ public:
 
 protected slots:
   void     onHeaderClicked( int );
+  void     rowsAboutToBeRemoved( const QModelIndex&, int, int );
   void     selectionChanged( const QItemSelection&, const QItemSelection& );
   
 protected: