: SalomeApp_Module( __DEFAULT_NAME__ ),
myModule( 0 ),
myXmlHandler ( 0 ),
- myLastActivateStatus( false )
+ myLastActivateStatus( true )
{
}
if ( !res )
return res;
+ // reset the activation status to the default value
+ myLastActivateStatus = true;
+
// ActivateReq: request class for internal activate() operation
class ActivateReq : public PyInterp_Request
{
// call Python module's activate() method (for the new modules)
if(PyObject_HasAttrString(myModule , "activate")){
PyObject* res1 = PyObject_CallMethod( myModule, "activate", "" );
- if( !res1 || !PyBool_Check( res1 ) )
- {
- PyErr_Print();
- //= true: for support of old modules
- myLastActivateStatus = true;
- }
- else
- {
- //detect return status
- myLastActivateStatus = PyObject_IsTrue( res1 );
- }
+ if ( !res1 || !PyBool_Check( res1 ) ) {
+ PyErr_Print();
+ //= true: for support of old modules
+ myLastActivateStatus = true;
+ }
+ else {
+ //detect return status
+ myLastActivateStatus = PyObject_IsTrue( res1 );
+ }
}
}