Skip to content

Commit 13e7b33

Browse files
committedMay 3, 2013
[diagrams] Show message on messagebar instead of messagebox
And some indentation updates
1 parent c7794ff commit 13e7b33

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎src/app/qgsdiagramproperties.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,10 @@ void QgsDiagramProperties::apply()
490490

491491
if ( 0 == mDiagramAttributesTreeWidget->topLevelItemCount() )
492492
{
493-
QMessageBox::warning( this, tr( "No attributes added." ),
494-
tr( "You did not add any attributes to this diagram layer. Please specify the attributes to visualize on the diagrams or disable diagrams." ), QMessageBox::Ok );
493+
QgisApp::instance()->messageBar()->pushMessage(
494+
tr( "Diagrams: No attributes added." ),
495+
tr( "You did not add any attributes to this diagram layer. Please specify the attributes to visualize on the diagrams or disable diagrams." ),
496+
QgsMessageBar::WARNING );
495497
}
496498

497499
bool scaleAttributeValueOk = false;
@@ -522,10 +524,10 @@ void QgsDiagramProperties::apply()
522524
if ( maxVal != DBL_MIN )
523525
{
524526
QgisApp::instance()->messageBar()->pushMessage(
525-
tr( "Interpolation value" ),
526-
tr( "You did not specify an interpolation value. A default value of %1 has been set." ).arg( QString::number( maxVal ) ),
527-
QgsMessageBar::INFO,
528-
5 );
527+
tr( "Interpolation value" ),
528+
tr( "You did not specify an interpolation value. A default value of %1 has been set." ).arg( QString::number( maxVal ) ),
529+
QgsMessageBar::INFO,
530+
5 );
529531

530532
mValueLineEdit->setText( QString::number( maxVal ) );
531533
}

0 commit comments

Comments
 (0)
Please sign in to comment.