[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    [PATCH]: juk: tageditor: refresh contents when the collection gets
From:       Γι <ge
Date:       2011-04-20 15:25:45
Message-ID: BANLkTimM_1VgrnKggwA4CeCNztsvhLKp-A () mail ! gmail ! com
[Download RAW message or body]

Hi all,

the problem I was facing was that after changing a tag's value in the
tag editor and saving it (Ctrl+T), the contents of the Artist, Album
and Genre (i.e. the comboboxes) were changing to the first value of
the combobox list (!), even though in the collection list the values
were showing up as they had just been saved.

Anyway, I think the problem was that when
TagEditor::slotUpdateCollection() was called (because of changing the
file's tags), TagEditor::updateCollection() updated the list of the
comboboxes but also reset their values to the first item of the list.
So, in order to set the correct values, I added a call to
TagEditor::slotRefresh() as per the attached patch.

I am not sure this is the optimal/correct fix for this behavior,
however it seems to be working fine so far. :-)

Regards,

-- 
Γιώργος Κυλάφας (Giorgos Kylafas)
http://en.wikipedia.org/wiki/Posting_style#Inline_replying

["refresh-tag-editor-contents.patch" (text/x-diff)]

commit 729275f046b8bececf67a867f1c61560fcfd6e3f
Author: Γιώργος Κυλάφας (Giorgos Kylafas) <gekylafas@gmail.com>
Date:   Wed Apr 20 16:35:50 2011 +0300

    juk: tageditor: refresh our contents when the collection gets updated.
    
    If we do not call slotRefresh() after updateCollection(), then the
    contents of tags "Artist", "Album" and "Genre" in the tag editor revert
    to the first value of each combobox.
---
 juk/tageditor.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/juk/tageditor.cpp b/juk/tageditor.cpp
index d16f3a3..ecf4859 100644
--- a/juk/tageditor.cpp
+++ b/juk/tageditor.cpp
@@ -368,8 +368,10 @@ void TagEditor::slotClear()
 
 void TagEditor::slotUpdateCollection()
 {
-    if(isVisible())
+    if(isVisible()) {
         updateCollection();
+        slotRefresh();
+    }
     else
         m_collectionChanged = true;
 }


_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic