Skip to content
Permalink
Browse files

Project macros: do not display the warning bar when there are no macr…

…os in the project, decrease warning bar message level for macros
  • Loading branch information
brushtyler committed Aug 31, 2012
1 parent c7fcef4 commit 54275e02a29732a4699bce999273dddd99092581
Showing with 5 additions and 8 deletions.
  1. +3 −2 src/app/qgisapp.cpp
  2. +2 −6 src/app/qgsprojectproperties.cpp
@@ -459,6 +459,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
QWidget *centralWidget = this->centralWidget();
QGridLayout *centralLayout = new QGridLayout( centralWidget );
centralWidget->setLayout( centralLayout );
centralLayout->setContentsMargins( 0, 0, 0, 0 );

// "theMapCanvas" used to find this canonical instance later
mMapCanvas = new QgsMapCanvas( centralWidget, "theMapCanvas" );
@@ -3240,9 +3241,9 @@ void QgisApp::fileOpen()
{
enableProjectMacros();
}
else
else if ( !QgsProject::instance()->readEntry( "Macros", "/pythonCode", QString::null ).isEmpty() )
{
mInfoBar->pushWidget( mMacrosWarn, 2 );
mInfoBar->pushWidget( mMacrosWarn, 1 );
}
}

@@ -578,12 +578,8 @@ void QgsProjectProperties::apply()
QgsProject::instance()->writeEntry( "DefaultStyles", "/RandomColors", cbxStyleRandomColors->isChecked() );

// store project macros
QString pythonMacros;
if ( grpPythonMacros->isChecked() )
{
pythonMacros = ptePythonMacros->toPlainText();
}
else
QString pythonMacros = ptePythonMacros->toPlainText();
if ( !grpPythonMacros->isChecked() || pythonMacros.isEmpty() )
{
pythonMacros = QString::null;
resetPythonMacros();

0 comments on commit 54275e0

Please sign in to comment.
You can’t perform that action at this time.