Icon on newly-made aliases is monotone
Bug #1095946 reported by
Vadim Peretokin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mudlet |
Opinion
|
Low
|
Unassigned |
Bug Description
When you create and hit 'Save' button on the alias that was just made, the icon that appears besides is monochrome - when the alias is enabled. Clicking on it causes it to go technicolor properly.
Changed in mudlet: | |
importance: | Undecided → Low |
To post a comment you must log in.
This is caused by a missing else in dlgTriggerEdito r::saveAlias( ) (in around line 3639 of dlgTriggerEdito r.cpp) which means that the grey (disabled by ancestor) icon is used. It is fixed in code put forward my me and currently being checked over by Ahmed Charles in his GH repository, branch "icons".
In essence the patch would be as follows, though there are other proposed changes that would clash:
if( pT->state() )
if( old_name == "New Alias" )//|| old_name == "New Alias Group" )
QIcon _icon;
if( pT->isFolder() )
{
if( pT->ancestorsAc tive() )
_icon. addPixmap( QPixmap( QStringLiteral( ":/icons/ folder- violet. png" ) ), QIcon::Normal, QIcon::Off );
else
_icon. addPixmap( QPixmap( QStringLiteral( ":/icons/ folder- grey.png" ) ), QIcon::Normal, QIcon::Off );
}
else
{
if( pT->ancestorsAc tive() )
_icon.addPixmap ( QPixmap( QStringLiteral( ":/icons/ tag_checkbox_ checked. png" ) ), QIcon::Normal, QIcon::Off );
{
{
+ else tag_checkbox_ checked_ grey.png" ) ), QIcon::Normal, QIcon::Off tag_checkbox_ checked_ grey.png" ) ), QIcon::Normal, QIcon::Off );
}
pItem-> setIcon( 0, _icon );
pItem-> setText( 0, name );
pT->setIsActive ( true );
else
pItem-> setIcon( 0, icon);
pItem-> setText( 0, name );
QIcon iconError;
iconError. addPixmap( QPixmap( QStringLiteral( ":/icons/ tools-report- bug.png" ) ), QIcon::Normal, QIcon::Off );
pItem- >setIcon( 0, iconError );
pItem- >setText( 0, name );
+ _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/
- _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/
);
}
{
}
}
else
{
}