]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Rolling back modifications removed by previous integration
authorsan <san@opencascade.com>
Mon, 30 Jan 2006 10:16:21 +0000 (10:16 +0000)
committersan <san@opencascade.com>
Mon, 30 Jan 2006 10:16:21 +0000 (10:16 +0000)
src/ObjBrowser/OB_Browser.cxx
src/ObjBrowser/OB_Browser.h

index d404687537f47282430776eebf95c619aab989d7..5b4bc28e39a036f1e0fcef2e8f4ae4db2c3f3148 100755 (executable)
@@ -23,6 +23,7 @@
 #include "OB_ListView.h"
 
 #include <SUIT_DataObjectIterator.h>
+#include <SUIT_TreeSync.h>
 
 #include <qcursor.h>
 #include <qlayout.h>
@@ -33,7 +34,7 @@
 #include <qpopupmenu.h>
 #include <qdatetime.h>
 
-#include <SUIT_TreeSync.h>
+#include <time.h>
 
 /*!
     Class: OB_Browser::ToolTip
@@ -252,6 +253,8 @@ myRootDecorated( true )
            this, SLOT( onDoubleClicked( QListViewItem* ) ) );
 
   setRootObject( root );
+
+  setModified();
 }
 
 OB_Browser::~OB_Browser()
@@ -356,6 +359,8 @@ void OB_Browser::setRootObject( SUIT_DataObject* theRoot )
 
   autoOpenBranches();
 
+  setModified();
+
   if ( selNum != numberOfSelected() )
     emit selectionChanged();
 }
@@ -665,8 +670,13 @@ void OB_Browser::updateTree( SUIT_DataObject* obj, const bool autoOpen )
   if( autoOpen )
     autoOpenBranches();
 
+  setModified();
+
   if ( selNum != numberOfSelected() )
     emit selectionChanged();
+
+//  QTime t2 = QTime::currentTime();
+//  qDebug( QString( "update tree time = %1 msecs" ).arg( t1.msecsTo( t2 ) ) );
 }
 
 void OB_Browser::replaceTree( SUIT_DataObject* src, SUIT_DataObject* trg )
@@ -703,6 +713,8 @@ void OB_Browser::replaceTree( SUIT_DataObject* src, SUIT_DataObject* trg )
 
   autoOpenBranches();
 
+  setModified();
+
   if ( selNum != numberOfSelected() )
     emit selectionChanged();
 }
@@ -1255,3 +1267,9 @@ void OB_Browser::onDoubleClicked( QListViewItem* item )
   if ( item )
     emit doubleClicked( dataObject( item ) );
 }
+
+void OB_Browser::setModified()
+{
+  myModifiedTime = clock();
+}
+
index 0fec2b90cec927ca21c3af4853cbe82c67925b68..a6e3cd42113231860df4d79739858decf157a98c 100755 (executable)
@@ -118,6 +118,9 @@ public:
 
   virtual void      contextMenuPopup( QPopupMenu* );
 
+  void              setModified();
+  unsigned long     getModifiedTime() { return myModifiedTime; }
+
 signals:
   void              selectionChanged();
   void              doubleClicked( SUIT_DataObject* );
@@ -186,6 +189,8 @@ private:
   int               myAutoOpenLevel;
 
   friend class OB_Browser::ToolTip;
+
+  unsigned long     myModifiedTime;
 };
 
 #endif