From: san Date: Mon, 30 Jan 2006 10:16:21 +0000 (+0000) Subject: Rolling back modifications removed by previous integration X-Git-Tag: T_merge_to_HEAD_20060207~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ba871725c06e8c9d3c2cfe096fa64aa95870105;p=modules%2Fgui.git Rolling back modifications removed by previous integration --- 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