From: Peter Penz Date: Thu, 20 Mar 2008 21:23:06 +0000 (+0000) Subject: assure that the maximum size of the item-delegate gets updated before showing the... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/c50a1e000f2def0fd013dff03a42a6627525525d assure that the maximum size of the item-delegate gets updated before showing the icons view svn path=/trunk/KDE/kdebase/apps/; revision=788152 --- diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 6235fcd87..9b9252857 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -255,6 +255,15 @@ void DolphinIconsView::wheelEvent(QWheelEvent* event) } } +void DolphinIconsView::showEvent(QShowEvent* event) +{ + Q_ASSERT(qobject_cast(itemDelegate()) != 0); + DolphinFileItemDelegate* delegate = static_cast(itemDelegate()); + delegate->setMaximumSize(m_itemSize); + + KCategorizedView::showEvent(event); +} + void DolphinIconsView::slotShowPreviewChanged() { const DolphinView* view = m_controller->dolphinView(); diff --git a/src/dolphiniconsview.h b/src/dolphiniconsview.h index e8e63eaf8..01aac03f2 100644 --- a/src/dolphiniconsview.h +++ b/src/dolphiniconsview.h @@ -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();