\param modName module name
\return module object pointer or 0 if module could not be loaded
*/
-CAM_Module* CAM_Application::loadModule( const QString& modName )
+CAM_Module* CAM_Application::loadModule( const QString& modName, const bool showMsg )
{
if ( myInfoList.isEmpty() )
{
module->setName( moduleName( modName ) );
}
- if ( !err.isEmpty() ) {
+ if ( !err.isEmpty() && showMsg ) {
if ( desktop() && desktop()->isVisible() )
SUIT_MessageBox::warning( desktop(), tr( "Error" ), err );
else
virtual void addModule( CAM_Module* );
virtual void loadModules();
- virtual CAM_Module* loadModule( const QString& );
+ virtual CAM_Module* loadModule( const QString&, const bool = true );
virtual bool activateModule( const QString& );
}
/*!Load module by \a name.*/
-CAM_Module* LightApp_Application::loadModule( const QString& name )
+CAM_Module* LightApp_Application::loadModule( const QString& name, const bool showMsg )
{
- CAM_Module* mod = CAM_Application::loadModule( name );
+ CAM_Module* mod = CAM_Application::loadModule( name, showMsg );
if ( mod )
{
connect( this, SIGNAL( studyOpened() ), mod, SLOT( onModelOpened() ) );
virtual QString applicationName() const;
virtual QString applicationVersion() const;
- virtual CAM_Module* loadModule( const QString& );
+ virtual CAM_Module* loadModule( const QString&, const bool = true );
virtual bool activateModule( const QString& );
LightApp_SelectionMgr* selectionMgr() const;
LightApp_Module* m = dynamic_cast<LightApp_Module*>( app ? app->module( mod_name ) : 0 );
if( !m && load )
{
- m = dynamic_cast<LightApp_Module*>( app->loadModule( mod_name ) );
+ m = dynamic_cast<LightApp_Module*>( app->loadModule( mod_name, false ) );
if( m )
app->addModule( m );
}