]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnview.cpp
fixed issue that the video preview size was wrong during resizing the information...
[dolphin.git] / src / dolphincolumnview.cpp
index 16d72c0f0622161a730b4471f2745303ead60b5c..f34be92e9b58e96809a1c3ef9a0eaeb66108cea5 100644 (file)
@@ -59,14 +59,14 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, DolphinController* control
             this, SLOT(setZoomLevel(int)));
     connect(controller, SIGNAL(activationChanged(bool)),
             this, SLOT(updateColumnsBackground(bool)));
-    connect(controller, SIGNAL(scrollToCurrentItem()),
-            this, SLOT(scrollToCurrentItem()));
 
     const DolphinView* view = controller->dolphinView();
     connect(view, SIGNAL(sortingChanged(DolphinView::Sorting)),
             this, SLOT(slotSortingChanged(DolphinView::Sorting)));
     connect(view, SIGNAL(sortOrderChanged(Qt::SortOrder)),
             this, SLOT(slotSortOrderChanged(Qt::SortOrder)));
+    connect(view, SIGNAL(sortFoldersFirstChanged(bool)),
+            this, SLOT(slotSortFoldersFirstChanged(bool)));
     connect(view, SIGNAL(showHiddenFilesChanged()),
             this, SLOT(slotShowHiddenFilesChanged()));
     connect(view, SIGNAL(showPreviewChanged()),
@@ -371,9 +371,9 @@ void DolphinColumnView::wheelEvent(QWheelEvent* event)
     // let Ctrl+wheel events propagate to the DolphinView for icon zooming
     if ((event->modifiers() & Qt::ControlModifier) == Qt::ControlModifier) {
         event->ignore();
-       return;
+    } else {
+        QAbstractItemView::wheelEvent(event);
     }
-    QAbstractItemView::wheelEvent(event);
 }
 
 void DolphinColumnView::setZoomLevel(int level)
@@ -450,6 +450,13 @@ void DolphinColumnView::slotSortOrderChanged(Qt::SortOrder order)
     }
 }
 
+void DolphinColumnView::slotSortFoldersFirstChanged(bool foldersFirst)
+{
+    foreach (DolphinColumnWidget* column, m_columns) {
+        column->setSortFoldersFirst(foldersFirst);
+    }
+}
+
 void DolphinColumnView::slotShowHiddenFilesChanged()
 {
     const bool show = m_controller->dolphinView()->showHiddenFiles();
@@ -467,12 +474,6 @@ void DolphinColumnView::slotShowPreviewChanged()
     }
 }
 
-void DolphinColumnView::scrollToCurrentItem()
-{
-    const QModelIndex activeIndex = activeColumn()->currentIndex();
-    activeColumn()->scrollTo(activeIndex);
-}
-
 void DolphinColumnView::setActiveColumnIndex(int index)
 {
     if (m_index == index) {