Skip to content

Commit

Permalink
[diagrams] Show message on messagebar instead of messagebox
Browse files Browse the repository at this point in the history
And some indentation updates
  • Loading branch information
m-kuhn committed May 3, 2013
1 parent c7794ff commit 13e7b33
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/app/qgsdiagramproperties.cpp
Expand Up @@ -490,8 +490,10 @@ void QgsDiagramProperties::apply()

if ( 0 == mDiagramAttributesTreeWidget->topLevelItemCount() )
{
QMessageBox::warning( this, tr( "No attributes added." ),
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 );
QgisApp::instance()->messageBar()->pushMessage(
tr( "Diagrams: No attributes added." ),
tr( "You did not add any attributes to this diagram layer. Please specify the attributes to visualize on the diagrams or disable diagrams." ),
QgsMessageBar::WARNING );
}

bool scaleAttributeValueOk = false;
Expand Down Expand Up @@ -522,10 +524,10 @@ void QgsDiagramProperties::apply()
if ( maxVal != DBL_MIN )
{
QgisApp::instance()->messageBar()->pushMessage(
tr( "Interpolation value" ),
tr( "You did not specify an interpolation value. A default value of %1 has been set." ).arg( QString::number( maxVal ) ),
QgsMessageBar::INFO,
5 );
tr( "Interpolation value" ),
tr( "You did not specify an interpolation value. A default value of %1 has been set." ).arg( QString::number( maxVal ) ),
QgsMessageBar::INFO,
5 );

mValueLineEdit->setText( QString::number( maxVal ) );
}
Expand Down

0 comments on commit 13e7b33

Please sign in to comment.