]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
KItemListView: add view position in scrollToItem()
[dolphin.git] / src / views / dolphinview.cpp
index d8eab142d54f4f37860337893e0089f6bb741bca..0a1d70bf11e334fc3d644861f4209c5546f95fc1 100644 (file)
@@ -270,7 +270,6 @@ void DolphinView::setActive(bool active)
     if (active) {
         m_container->setFocus();
         Q_EMIT activated();
-        Q_EMIT writeStateChanged(m_isFolderWritable);
     }
 }
 
@@ -1762,7 +1761,7 @@ void DolphinView::updateViewState()
 
                 // scroll to current item and reset the state
                 if (m_scrollToCurrentItem) {
-                    m_view->scrollToItem(currentIndex);
+                    m_view->scrollToItem(currentIndex, KItemListView::ViewItemPosition::Middle);
                     m_scrollToCurrentItem = false;
                 }
                 m_currentItemUrl = QUrl();
@@ -2246,6 +2245,11 @@ void DolphinView::updateWritableState()
     }
 }
 
+bool DolphinView::isFolderWritable() const
+{
+    return m_isFolderWritable;
+}
+
 QUrl DolphinView::viewPropertiesUrl() const
 {
     if (m_viewPropertiesContext.isEmpty()) {