public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in kde-base/dolphin/files: dolphin-4.8.3-fix-selection.patch dolphin-4.8.0-fix-selection.patch
@ 2012-05-07  9:23 Johannes Huber (johu)
  0 siblings, 0 replies; only message in thread
From: Johannes Huber (johu) @ 2012-05-07  9:23 UTC (permalink / raw
  To: gentoo-commits

johu        12/05/07 09:23:57

  Added:                dolphin-4.8.3-fix-selection.patch
  Removed:              dolphin-4.8.0-fix-selection.patch
  Log:
  Revision bump adds patch to fix selection and focus issues by Franz Fellner <alpine.art.de@googlemail.com> wrt bug #414693.
  
  (Portage version: 2.2.0_alpha101/cvs/Linux i686)

Revision  Changes    Path
1.1                  kde-base/dolphin/files/dolphin-4.8.3-fix-selection.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/dolphin/files/dolphin-4.8.3-fix-selection.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/dolphin/files/dolphin-4.8.3-fix-selection.patch?rev=1.1&content-type=text/plain

Index: dolphin-4.8.3-fix-selection.patch
===================================================================
commit 0139537a35d636356fa088c61557baf13bb2e71b
Author: Peter Penz <peter.penz19@gmail.com>
Date:   Sat May 5 21:51:26 2012 +0200

    Assure that a newly created item gets selected/focused and visible
    
    Thanks to Franz Fellner for the patch!
    
    BUG: 291064
    FIXED-IN: 4.8.4
    CCMAIL: alpine.art.de@googlemail.com

diff --git a/dolphin/src/views/dolphinview.cpp b/dolphin/src/views/dolphinview.cpp
index 3a220e7..c5b2004 100644
--- a/dolphin/src/views/dolphinview.cpp
+++ b/dolphin/src/views/dolphinview.cpp
@@ -1015,23 +1015,23 @@ KFileItem DolphinView::rootItem() const
 void DolphinView::observeCreatedItem(const KUrl& url)
 {
     m_createdItemUrl = url;
-    //connect(m_dirModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
-    //        this, SLOT(selectAndScrollToCreatedItem()));
+    connect(fileItemModel(), SIGNAL(loadingCompleted()),
+            this, SLOT(selectAndScrollToCreatedItem()));
 }
 
 void DolphinView::selectAndScrollToCreatedItem()
 {
-    /*const QModelIndex dirIndex = m_viewAccessor.dirModel()->indexForUrl(m_createdItemUrl);
-    if (dirIndex.isValid()) {
-        const QModelIndex proxyIndex = m_viewAccessor.proxyModel()->mapFromSource(dirIndex);
-        QAbstractItemView* view = m_viewAccessor.itemView();
-        if (view) {
-            view->setCurrentIndex(proxyIndex);
-        }
+    KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager();
+    const int index = fileItemModel()->index(m_createdItemUrl);
+    if (index != -1) {
+        selectionManager->setCurrentItem(index);
+        selectionManager->clearSelection();
+        selectionManager->setSelected(index);
+        m_container->controller()->view()->scrollToItem(index);
     }
 
-    disconnect(m_viewAccessor.dirModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
-               this, SLOT(selectAndScrollToCreatedItem()));*/
+    disconnect(fileItemModel(), SIGNAL(loadingCompleted()),
+               this, SLOT(selectAndScrollToCreatedItem()));
     m_createdItemUrl = KUrl();
 }
 






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-07  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07  9:23 [gentoo-commits] gentoo-x86 commit in kde-base/dolphin/files: dolphin-4.8.3-fix-selection.patch dolphin-4.8.0-fix-selection.patch Johannes Huber (johu)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox