Skip to content

Commit 2f4489d

Browse files
committedSep 26, 2014
change to messagebar some messageboxes in mainapp
1 parent 0fd63e8 commit 2f4489d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7714,8 +7714,8 @@ QgsVectorLayer* QgisApp::addVectorLayer( QString vectorLayerPath, QString baseNa
77147714
}
77157715
else
77167716
{
7717-
QMessageBox::critical( this, tr( "Layer is not valid" ),
7718-
tr( "The layer %1 is not a valid layer and can not be added to the map" ).arg( vectorLayerPath ) );
7717+
QString msg = tr( "The layer %1 is not a valid layer and can not be added to the map" ).arg( vectorLayerPath );
7718+
messageBar()->pushMessage( tr( "Layer is not valid" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );
77197719

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

77647764
// draw the map

0 commit comments

Comments
 (0)
Please sign in to comment.