Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Followup 9dccce8, nicer error messages
  • Loading branch information
nyalldawson committed Jan 12, 2016
1 parent d01307f commit 7495d9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/app/qgisapp.cpp
Expand Up @@ -6948,8 +6948,8 @@ void QgisApp::copyStyle( QgsMapLayer * sourceLayer )

if ( !errorMsg.isEmpty() )
{
messageBar()->pushMessage( errorMsg,
tr( "Cannot copy style: %1" ),
messageBar()->pushMessage( tr( "Cannot copy style" ),
errorMsg,
QgsMessageBar::CRITICAL, messageTimeout() );
return;
}
Expand Down Expand Up @@ -6978,16 +6978,16 @@ void QgisApp::pasteStyle( QgsMapLayer * destinationLayer )
if ( !doc.setContent( clipboard()->data( QGSCLIPBOARD_STYLE_MIME ), false, &errorMsg, &errorLine, &errorColumn ) )
{

messageBar()->pushMessage( errorMsg,
tr( "Cannot parse style: %1:%2:%3" ),
messageBar()->pushMessage( tr( "Cannot parse style" ),
errorMsg,
QgsMessageBar::CRITICAL, messageTimeout() );
return;
}

if ( !selectionLayer->importNamedStyle( doc, errorMsg ) )
{
messageBar()->pushMessage( errorMsg,
tr( "Cannot paste style: %1" ),
messageBar()->pushMessage( tr( "Cannot paste style" ),
errorMsg,
QgsMessageBar::CRITICAL, messageTimeout() );
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -854,7 +854,7 @@ void QgsVectorLayerProperties::loadStyle_clicked()
else
{
//let the user know what went wrong
QMessageBox::information( this, tr( "Load Style" ), myMessage );
QMessageBox::warning( this, tr( "Load Style" ), myMessage );
}

QFileInfo myFI( myFileName );
Expand Down

0 comments on commit 7495d9e

Please sign in to comment.