Skip to content

Commit

Permalink
Show message in dd menu if no variables set
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 22, 2015
1 parent 4dea16a commit 81d7ce7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gui/qgsdatadefinedbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,15 @@ void QgsDataDefinedButton::aboutToShowMenu()
variableActive = true;
}
}
}

if ( !variables.isEmpty() )
{
mDefineMenu->addAction( mActionVariables );
}
if ( mVariablesMenu->actions().isEmpty() )
{
QAction* act = mVariablesMenu->addAction( tr( "No variables set" ) );
act->setEnabled( false );
}

mDefineMenu->addAction( mActionVariables );
mVariablesMenu->menuAction()->setCheckable( true );
mVariablesMenu->menuAction()->setChecked( variableActive );

Expand Down

0 comments on commit 81d7ce7

Please sign in to comment.