Bug 288921 - Dolphin displays wrong icon for item after closing its property dialog by clicking the 'OK' button
Summary: Dolphin displays wrong icon for item after closing its property dialog by cli...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 1.99
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-13 21:15 UTC by Jekyll Wu
Modified: 2012-04-01 08:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jekyll Wu 2011-12-13 21:15:12 UTC
Version:           1.99 (using Devel) 
OS:                Linux

After closing the property dialog by clicking the 'OK' button, dolphin display wrong icon (a question mark within white rectangle)for that item.

It happens only when closing the property dialog by clicking the 'OK' button. A simple refresh by F5 will make dolphin display the right icon.

Hint: this happens in the master code I just built but not in 4.8 beta2, so it looks like a regression introduced quite recently.



Reproducible: Always

Steps to Reproduce:
1. create a empty folder
2. open the property dialog of that empty folder
3. close that property dialog by clicking the 'Ok' button

Actual Results:  
the icon of that empty folder changes to a question mark within rectangle.

Expected Results:  
the icon of that empty folder should not change
Comment 1 Frank Reininghaus 2011-12-14 21:23:43 UTC
Thanks for the report! Confirmed in current master. Looks like it's an easier way to get bug 288824 (that report is about changing a folder icon and then pressing OK in the dialog). However, that one has been reported for beta2. I can't check easily here if there really was something between beta2 and current master that changed this because it seems that the git repository doesn't contain a beta2 tag.
Comment 2 Peter Penz 2011-12-16 21:06:39 UTC
Git commit bb192503cac22b08f0dd0c82e6bf059be8f98265 by Peter Penz.
Committed on 16/12/2011 at 22:01.
Pushed by ppenz into branch 'master'.

Update the roles if items have been changed

The code "// TODO..." in slotItemsChanged() obviously was not
sufficient ;-)

BUG: 288691
BUG: 288824
BUG: 288921
FIXED-IN: 4.8.0

M  +42   -38   dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp
M  +23   -0    dolphin/src/kitemviews/kfileitemmodelrolesupdater.h

http://commits.kde.org/kde-baseapps/bb192503cac22b08f0dd0c82e6bf059be8f98265
Comment 3 Jekyll Wu 2011-12-18 20:16:17 UTC
Peter, thanks for the fix. However, there is still a little visual glitch. After pressing the 'OK' button, the selected item's icon will switch quickly to that question mask for a short period, then switch back to the original icon. 

This is not that annoying, but I think it is better to put it here in case I just forget this small issue.
Comment 4 Peter Penz 2011-12-18 20:43:01 UTC
I need to test this again on a slow computer but this should only occur if determining the MIME-type is not possible within 200 ms (Dolphin decides in this case to show the unknown icon until the MIME-type is known). Usually MIME-types can be determined very fast - does this occur on each file in your environment?

If 'yes' I'd suggest that we reopen this issue again and I'll check whether this can be improved. However I guess I need to postpone this optimization until after 4.8 as there are still more important issues to fix first ;-) Anyway thanks for pointing this out.
Comment 5 Jekyll Wu 2011-12-18 21:27:45 UTC
Yes, this happens to every item(file or folder) I have tried. It even applies to a brand new empty folder. 

So I will reopen this report.
Comment 6 Peter Penz 2011-12-19 08:45:23 UTC
I could reproduce this too now on my slow computer for each item - yep, this needs to get improved.
Comment 7 Jekyll Wu 2012-04-01 08:02:41 UTC
(In reply to comment #3)
> Peter, thanks for the fix. However, there is still a little visual glitch.
> After pressing the 'OK' button, the selected item's icon will switch quickly
> to that question mask for a short period, then switch back to the original
> icon. 
> 
> This is not that annoying, but I think it is better to put it here in case I
> just forget this small issue.

That visual glitch seems gone using current master branch.
Comment 8 Peter Penz 2012-04-01 08:56:40 UTC
@Jekyll Wu: Ah, I forgot to close this bug when fixing a quite similar issue with commit d389ae954c5bfaf84a30899b6b6e6b70a23f0698 :
"Prevent flickering when updating items
    
When downloading images from e.g. the camera-IO-slave the files
will be downloaded as *.part files and renamed afterwards. The renaming
results in an undetermined mimetype and hence the probably already available
preview or icon gets replaced by a dummy icon. The patch fixes this by
keeping the old values as long until they have been resolved by
KFileItemModelRolesUpdater."

This patch also fixed this issue :-)