Skip to content
Permalink
Browse files

Followup 9dccce8, nicer error messages

  • Loading branch information
nyalldawson committed Jan 12, 2016
1 parent d01307f commit 7495d9eada9237830769580de0ea9410e61e597c
Showing with 7 additions and 7 deletions.
  1. +6 −6 src/app/qgisapp.cpp
  2. +1 −1 src/app/qgsvectorlayerproperties.cpp
@@ -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;
}
@@ -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;
}
@@ -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 );

0 comments on commit 7495d9e

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