Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
change to messagebar some messageboxes in mainapp
  • Loading branch information
slarosa committed Sep 26, 2014
1 parent 0fd63e8 commit 2f4489d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -7714,8 +7714,8 @@ QgsVectorLayer* QgisApp::addVectorLayer( QString vectorLayerPath, QString baseNa
}
else
{
QMessageBox::critical( this, tr( "Layer is not valid" ),
tr( "The layer %1 is not a valid layer and can not be added to the map" ).arg( vectorLayerPath ) );
QString msg = tr( "The layer %1 is not a valid layer and can not be added to the map" ).arg( vectorLayerPath );
messageBar()->pushMessage( tr( "Layer is not valid" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );

delete layer;
mMapCanvas->freeze( false );
Expand Down Expand Up @@ -7757,8 +7757,8 @@ void QgisApp::addMapLayer( QgsMapLayer *theMapLayer )
}
else
{
QMessageBox::critical( this, tr( "Layer is not valid" ),
tr( "The layer is not a valid layer and can not be added to the map" ) );
QString msg = tr( "The layer is not a valid layer and can not be added to the map" );
messageBar()->pushMessage( tr( "Layer is not valid" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );
}

// draw the map
Expand Down

0 comments on commit 2f4489d

Please sign in to comment.