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 b6d8675
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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.