Skip to content

Commit

Permalink
Fix broken qgscolorramp button
Browse files Browse the repository at this point in the history
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.
2 changes: 1 addition & 1 deletion src/gui/qgscolorrampbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit b6d8675

Please sign in to comment.