From 8a76c7d3f51e9178556d0e2ba40dcac9eafda7a1 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 3 Dec 2009 12:33:02 +0000 Subject: [PATCH] IPAL21493 Incorrect behaviour of Computation, Evaluation succeed dialog boxes in consecutive operations. --- src/LightApp/LightApp_Module.cxx | 10 +++++++++- src/LightApp/LightApp_Module.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index ab36849ae..228234513 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -510,7 +510,7 @@ void LightApp_Module::setPreferenceProperty( const int id, const QString& prop, void LightApp_Module::startOperation( const int id ) { LightApp_Operation* op = 0; - if( myOperations.contains( id ) ) + if( myOperations.contains( id ) && reusableOperation( id ) ) op = myOperations[ id ]; else { @@ -641,3 +641,11 @@ LightApp_Operation* LightApp_Module::operation( const int id ) const { return myOperations.contains( id ) ? myOperations[id] : 0; } + +/*! + virtual method called to manage the same operations +*/ +bool LightApp_Module::reusableOperation( const int id ) +{ + return true; +} diff --git a/src/LightApp/LightApp_Module.h b/src/LightApp/LightApp_Module.h index 88ed1b44e..9d5b40562 100644 --- a/src/LightApp/LightApp_Module.h +++ b/src/LightApp/LightApp_Module.h @@ -115,6 +115,8 @@ protected: virtual CAM_DataModel* createDataModel(); + virtual bool reusableOperation( const int id ); + int addPreference( const QString& label ); int addPreference( const QString& label, const int pId, const int = LightApp_Preferences::Auto, const QString& section = QString(), -- 2.39.2