From 9ba871725c06e8c9d3c2cfe096fa64aa95870105 Mon Sep 17 00:00:00 2001 From: san Date: Mon, 30 Jan 2006 10:16:21 +0000 Subject: [PATCH] Rolling back modifications removed by previous integration --- src/ObjBrowser/OB_Browser.cxx | 20 +++++++++++++++++++- src/ObjBrowser/OB_Browser.h | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index d40468753..5b4bc28e3 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -23,6 +23,7 @@ #include "OB_ListView.h" #include +#include #include #include @@ -33,7 +34,7 @@ #include #include -#include +#include /*! 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(); +} + diff --git a/src/ObjBrowser/OB_Browser.h b/src/ObjBrowser/OB_Browser.h index 0fec2b90c..a6e3cd421 100755 --- a/src/ObjBrowser/OB_Browser.h +++ b/src/ObjBrowser/OB_Browser.h @@ -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 -- 2.39.2