Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit '4bda6c883bff2af152b1de8d7f6d4820780c2cd2'
[modules/gui.git]
/
src
/
SalomeApp
/
SalomeApp_DataModel.cxx
diff --git
a/src/SalomeApp/SalomeApp_DataModel.cxx
b/src/SalomeApp/SalomeApp_DataModel.cxx
index 207e6acd86f22aec321562c28915a088c09f7845..8edc66316de2ccd6127e44c3451a42aac18da1e2 100644
(file)
--- a/
src/SalomeApp/SalomeApp_DataModel.cxx
+++ b/
src/SalomeApp/SalomeApp_DataModel.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
23 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-236,7
+236,7
@@
suitPtr SalomeApp_DataModelSync::parent( const suitPtr& p ) const
Updates SUIT object
\param p - SUIT object
*/
Updates SUIT object
\param p - SUIT object
*/
-void SalomeApp_DataModelSync::updateItem( const kerPtr&
obj
, const suitPtr& ) const
+void SalomeApp_DataModelSync::updateItem( const kerPtr&, const suitPtr& ) const
{
}
{
}
@@
-254,7
+254,7
@@
void showTree( SUIT_DataObject* root )
{
QString marg; marg.fill( ' ', 3*it.depth() );
QString nnn = "%1 '%2'";
{
QString marg; marg.fill( ' ', 3*it.depth() );
QString nnn = "%1 '%2'";
- qDebug( nnn.arg( marg ).arg( it.current()->name() ).to
Latin1
() );
+ qDebug( nnn.arg( marg ).arg( it.current()->name() ).to
Utf8
() );
}
}
}
}
@@
-286,8
+286,7
@@
bool SalomeApp_DataModel::open( const QString& name, CAM_Study* study, QStringLi
if ( anId.isEmpty() )
return true; // Probably nothing to load
if ( anId.isEmpty() )
return true; // Probably nothing to load
- _PTR(Study) aStudy ( aDoc->studyDS() ); // shared_ptr cannot be used here
- _PTR(SComponent) aSComp ( aStudy->FindComponentID( std::string( anId.toLatin1() ) ) );
+ _PTR(SComponent) aSComp ( SalomeApp_Application::getStudy()->FindComponentID( std::string( anId.toUtf8() ) ) );
if ( aSComp )
updateTree( aSComp, aDoc );
if ( aSComp )
updateTree( aSComp, aDoc );
@@
-321,8
+320,7
@@
void SalomeApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study )
studyRoot = dynamic_cast<LightApp_RootObject*>( aSStudy->root() );
QString anId = getRootEntry( aSStudy );
if ( !anId.isEmpty() ){ // if nothing is published in the study for this module -> do nothing
studyRoot = dynamic_cast<LightApp_RootObject*>( aSStudy->root() );
QString anId = getRootEntry( aSStudy );
if ( !anId.isEmpty() ){ // if nothing is published in the study for this module -> do nothing
- _PTR(Study) aStudy ( aSStudy->studyDS() );
- sobj = aStudy->FindComponentID( std::string( anId.toLatin1() ) );
+ sobj = SalomeApp_Application::getStudy()->FindComponentID( std::string( anId.toUtf8() ) );
}
}
}
}
}
}
@@
-331,9
+329,8
@@
void SalomeApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study )
if ( studyRoot ) {
aSStudy = dynamic_cast<SalomeApp_Study*>( studyRoot->study() ); // <study> value should not change here theoretically, but just to make sure
if ( aSStudy ) {
if ( studyRoot ) {
aSStudy = dynamic_cast<SalomeApp_Study*>( studyRoot->study() ); // <study> value should not change here theoretically, but just to make sure
if ( aSStudy ) {
- _PTR(Study) aStudy ( aSStudy->studyDS() );
// modelRoot->object() cannot be reused here: it is about to be deleted by buildTree() soon
// modelRoot->object() cannot be reused here: it is about to be deleted by buildTree() soon
- sobj =
aStudy->FindComponentID( std::string( modelRoot->entry().toLatin1
() ) );
+ sobj =
SalomeApp_Application::getStudy()->FindComponentID( std::string( modelRoot->entry().toUtf8
() ) );
}
}
}
}
}
}