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

List:       kde-commits
Subject:    KDE/kdebase/apps/plasma/applets/folderview
From:       Fredrik Höglund <fredrik () kde ! org>
Date:       2010-01-12 22:51:21
Message-ID: 1263336681.867908.25252.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1073828 by fredrik:

Hide the editor before changing the focus, to prevent the editor
data from being committed twice.


 M  +5 -3      iconview.cpp  


--- trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp #1073827:1073828
@@ -1410,13 +1410,15 @@
 {
     Q_UNUSED(hint)
 
-    if (editor->hasFocus()) {
-        setFocus();
-    }
+    bool hadFocus = editor->hasFocus();
 
     editor->hide();
     editor->deleteLater();
 
+    if (hadFocus) {
+        setFocus();
+    }
+
     m_editorIndex = QModelIndex();
 
     markAreaDirty(visibleArea());
[prev in list] [next in list] [prev in thread] [next in thread] 

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