mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[needs-docs] Add a "shuffle random" option to color ramp button
Allows quick regeneration of a new set of random colors if the current color ramp is a random color ramp.
This commit is contained in:
parent
499a35d0c8
commit
927faf7037
@ -268,6 +268,13 @@ void QgsColorRampButton::prepareMenu()
|
||||
randomColorRampAction->setChecked( isRandomColorRamp() );
|
||||
mMenu->addAction( randomColorRampAction );
|
||||
connect( randomColorRampAction, &QAction::triggered, this, &QgsColorRampButton::setRandomColorRamp );
|
||||
|
||||
if ( isRandomColorRamp() || dynamic_cast<QgsLimitedRandomColorRamp *>( mColorRamp ) )
|
||||
{
|
||||
QAction *shuffleRandomColorRampAction = new QAction( tr( "Shuffle random colors" ), this );
|
||||
mMenu->addAction( shuffleRandomColorRampAction );
|
||||
connect( shuffleRandomColorRampAction, &QAction::triggered, this, &QgsColorRampButton::colorRampChanged );
|
||||
}
|
||||
}
|
||||
|
||||
mMenu->addSeparator();
|
||||
|
Loading…
x
Reference in New Issue
Block a user