Skip to content
Permalink
Browse files

Fix broken qgscolorramp button

For a misterious reason ( the docs are not completely clear )
calling text() on the ramp QAction returned all string prefixed
with '&' causing the whole button to miss the changed ramp.

By calling iconText() instead we get the right name for
the ramp.
  • Loading branch information
elpaso committed Aug 31, 2017
1 parent 4810c73 commit b6d86753e27afca3e2caa870764fa5bf1c1271b4
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgscolorrampbutton.cpp
@@ -337,7 +337,7 @@ void QgsColorRampButton::loadColorRamp()
QAction *selectedItem = qobject_cast<QAction *>( sender() );
if ( selectedItem )
{
QString name = selectedItem->text();
QString name = selectedItem->iconText();
setColorRampName( name );
setColorRampFromName( name );
}

0 comments on commit b6d8675

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