From 052518c0b585d1bf8381f808f98f694f0986d1da Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 7 Dec 2009 11:32:58 +0000 Subject: [PATCH] Update() now does not have arguments --- src/SalomeApp/SalomeApp_Notebook.cxx | 19 ++++--------------- src/SalomeApp/SalomeApp_Notebook.h | 3 +-- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Notebook.cxx b/src/SalomeApp/SalomeApp_Notebook.cxx index 78ab36e08..3b02213ef 100644 --- a/src/SalomeApp/SalomeApp_Notebook.cxx +++ b/src/SalomeApp/SalomeApp_Notebook.cxx @@ -105,19 +105,8 @@ QString SalomeApp_Notebook::expression( const QString& theName ) const QVariant SalomeApp_Notebook::calculate( const QString& theExpr ) { - if( CORBA::is_nil( myTmp ) ) - { - static const char TMP_NAME[] = "__tmp__"; - myTmp = myNotebook->GetParameter( TMP_NAME ); - if( CORBA::is_nil( myTmp ) ) - { - myNotebook->AddReal( TMP_NAME, 0 ); - myTmp = myNotebook->GetParameter( TMP_NAME ); - } - } - myTmp->SetExpression( theExpr.toLatin1().constData() ); - myTmp->Update( myNotebook.in() ); - return convert( myTmp ); + SALOME::Parameter_var aParam = myNotebook->Calculate( theExpr.toLatin1().constData() ); + return convert( aParam.in() ); } bool SalomeApp_Notebook::isValid( const QString& theName ) const @@ -148,9 +137,9 @@ QVariant SalomeApp_Notebook::convert( SALOME::Parameter_ptr theParam ) const return aRes; } -void SalomeApp_Notebook::update( bool theOnlyParameters ) +void SalomeApp_Notebook::update() { - myNotebook->Update( theOnlyParameters ); + myNotebook->Update(); } void SalomeApp_Notebook::remove( const QString& theParamName ) diff --git a/src/SalomeApp/SalomeApp_Notebook.h b/src/SalomeApp/SalomeApp_Notebook.h index 33e5dfb3d..78417a26f 100644 --- a/src/SalomeApp/SalomeApp_Notebook.h +++ b/src/SalomeApp/SalomeApp_Notebook.h @@ -56,7 +56,7 @@ public: bool isValid( const QString& theName ) const; - void update( bool theOnlyParameters ); + void update(); void remove( const QString& theParamName ); void rename( const QString& theOldName, const QString& theNewName ); @@ -78,7 +78,6 @@ protected: private: SALOME::Notebook_var myNotebook; - SALOME::Parameter_var myTmp; }; #endif -- 2.39.2