Skip to content
Permalink
Browse files

Show message in dd menu if no variables set

  • Loading branch information
nyalldawson committed Aug 22, 2015
1 parent 4dea16a commit 81d7ce7e5d68ce4988b3e812ebce26ad85c80b67
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/gui/qgsdatadefinedbutton.cpp
@@ -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 );

0 comments on commit 81d7ce7

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