Skip to content
Permalink
Browse files
[color button] add colour wheel to right click menu
  • Loading branch information
NathanW2 committed May 18, 2016
1 parent dc9b56e commit 773212b24111cfeb9aa380ceb27c630f4ca6cfa5
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/gui/qgscolorbuttonv2.cpp
@@ -408,6 +408,15 @@ void QgsColorButtonV2::prepareMenu()
connect( noColorAction, SIGNAL( triggered() ), this, SLOT( setToNoColor() ) );
}

mMenu->addSeparator();
QgsColorWheel* colorWheel = new QgsColorWheel( mMenu );
colorWheel->setColor( color() );
QgsColorWidgetAction* colorAction = new QgsColorWidgetAction( colorWheel, mMenu, mMenu );
colorAction->setDismissOnColorSelection( false );
connect( colorAction, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
mMenu->addAction( colorAction );


if ( mColorSchemeRegistry )
{
//get schemes with ShowInColorButtonMenu flag set

0 comments on commit 773212b

Please sign in to comment.