Icon on newly-made aliases is monotone

Bug #1095946 reported by Vadim Peretokin
6
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.

Heiko (koehnheiko)
Changed in mudlet:
importance: Undecided → Low
Revision history for this message
Stephen Lyons (slysven) wrote :

This is caused by a missing else in dlgTriggerEditor::saveAlias() (in around line 3639 of dlgTriggerEditor.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->ancestorsActive() )
                             _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->ancestorsActive() )
                            _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/tag_checkbox_checked.png" ) ), QIcon::Normal, QIcon::Off );

+ else
+ _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/tag_checkbox_checked_grey.png" ) ), QIcon::Normal, QIcon::Off
- _icon.addPixmap( QPixmap( QStringLiteral( ":/icons/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 );
                 }
             }
             else
             {
                 QIcon iconError;
                 iconError.addPixmap( QPixmap( QStringLiteral( ":/icons/tools-report-bug.png" ) ), QIcon::Normal, QIcon::Off );
                 pItem->setIcon( 0, iconError );
                 pItem->setText( 0, name );
             }

Revision history for this message
Stephen Lyons (slysven) wrote :

Bother, didn't wrap/paste correctly. 8-(

Changed in mudlet:
status: New → In Progress
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Migrating issues to Github, please follow the new discussion here: https://github.com/Mudlet/Mudlet/issues/528

This issue needs to be closed and there is no appropriate status, so will set it to "Opinion" just for migration purposes.

Changed in mudlet:
status: In Progress → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.