]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
CCAR: optimization for autoupdate
authorcaremoli <caremoli>
Tue, 22 Jun 2010 09:40:50 +0000 (09:40 +0000)
committercaremoli <caremoli>
Tue, 22 Jun 2010 09:40:50 +0000 (09:40 +0000)
src/SUIT/SUIT_DataObject.cxx
src/SUIT/SUIT_TreeModel.cxx
src/SalomeApp/SalomeApp_Application.cxx

index 93afce80929ce9ee440b546509bedde9a338677f..8ca7fe141bf8abf00bfa0bceeb388e255dd70489 100755 (executable)
@@ -887,6 +887,7 @@ void SUIT_DataObject::Signal::deleteLater( SUIT_DataObject* object )
 
 void SUIT_DataObject::updateItem()
 {
+  if(modified())return;
   setModified(true);
   signal()->emitUpdated(this);
 }
index 6d318774f5f3d7a929e3a6ab9b8b469da92c6337..8eab45e8c4acfafa46f2100b8b77033595887bff 100755 (executable)
@@ -673,6 +673,7 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const
     return QVariant();
 
   SUIT_DataObject* obj = object( index );
+  obj->setModified(false);
 
   QColor c;
   QVariant val;
@@ -1222,7 +1223,7 @@ SUIT_TreeModel::TreeItem* SUIT_TreeModel::createItem( SUIT_DataObject* obj,
 
   endInsertRows();
 
-  obj->setModified(false);
+  //obj->setModified(false);
 
   return myItems[ obj ];
 }
@@ -1253,7 +1254,7 @@ void SUIT_TreeModel::updateItem( SUIT_TreeModel::TreeItem* item )
   QModelIndex firstIdx = index( obj, 0 );
   QModelIndex lastIdx  = index( obj, columnCount() - 1 );
   emit dataChanged( firstIdx, lastIdx );
-  obj->setModified(false);
+  //obj->setModified(false);
 }
 
 /*!
@@ -1270,7 +1271,7 @@ void SUIT_TreeModel::updateItem( SUIT_DataObject* obj)
   QModelIndex firstIdx = index( obj, 0 );
   QModelIndex lastIdx  = index( obj, columnCount() - 1 );
   emit dataChanged( firstIdx, lastIdx );
-  obj->setModified(false);
+  //obj->setModified(false);
 }
 
 
index 215abb3448fc30cf3cebabdc86e4d67c95896b83..63c1df391d89ef55ec37b6f5c1c984863b02b36c 100644 (file)
@@ -832,7 +832,7 @@ QWidget* SalomeApp_Application::createWindow( const int flag )
       // temporary commented
       //ob->setUpdater( new SalomeApp_Updater() );
 
-      ob->setAutoUpdate(false);
+      ob->setAutoUpdate(true);
 
       connect( ob, SIGNAL( doubleClicked( SUIT_DataObject* ) ), this, SLOT( onDblClick( SUIT_DataObject* ) ) );