]> cloud.milkyroute.net Git - dolphin.git/commitdiff
assure that the maximum size of the item-delegate gets updated before showing the...
authorPeter Penz <peter.penz19@gmail.com>
Thu, 20 Mar 2008 21:23:06 +0000 (21:23 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 20 Mar 2008 21:23:06 +0000 (21:23 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=788152

src/dolphiniconsview.cpp
src/dolphiniconsview.h

index 6235fcd871ddfa947a420bb8f7e980ac13c3e341..9b9252857ef11aa03445ff3abcf9469cfcf4fe18 100644 (file)
@@ -255,6 +255,15 @@ void DolphinIconsView::wheelEvent(QWheelEvent* event)
     }
 }
 
+void DolphinIconsView::showEvent(QShowEvent* event)
+{
+    Q_ASSERT(qobject_cast<DolphinFileItemDelegate*>(itemDelegate()) != 0);
+    DolphinFileItemDelegate* delegate = static_cast<DolphinFileItemDelegate*>(itemDelegate());
+    delegate->setMaximumSize(m_itemSize);
+
+    KCategorizedView::showEvent(event);
+}
+
 void DolphinIconsView::slotShowPreviewChanged()
 {
     const DolphinView* view = m_controller->dolphinView();
index e8e63eaf877a657bf984ac1560480eb00eda371d..01aac03f2f52f41dc39ecf32a5345dde76df6069 100644 (file)
@@ -59,6 +59,7 @@ protected:
     virtual void dropEvent(QDropEvent* event);
     virtual void keyPressEvent(QKeyEvent* event);
     virtual void wheelEvent(QWheelEvent* event);
+    virtual void showEvent(QShowEvent* event);
 
 private slots:
     void slotShowPreviewChanged();