From: Peter Penz Date: Sat, 22 Nov 2008 21:07:20 +0000 (+0000) Subject: The opening/closing animation of subtrees flickers in combination with the sidebar... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/55ec5ac2add143a2d15576856f3a3b9c3d010fd6 The opening/closing animation of subtrees flickers in combination with the sidebar when using the Oxygen style. As workaround the animation is turned off. svn path=/trunk/KDE/kdebase/apps/; revision=887781 --- diff --git a/src/sidebartreeview.cpp b/src/sidebartreeview.cpp index 3b1b13bb1..a876ee6c3 100644 --- a/src/sidebartreeview.cpp +++ b/src/sidebartreeview.cpp @@ -66,7 +66,8 @@ SidebarTreeView::~SidebarTreeView() bool SidebarTreeView::event(QEvent* event) { - if (event->type() == QEvent::Polish) { + switch (event->type()) { + case QEvent::Polish: // hide all columns except of the 'Name' column hideColumn(DolphinModel::Size); hideColumn(DolphinModel::ModifiedTime); @@ -77,12 +78,23 @@ bool SidebarTreeView::event(QEvent* event) hideColumn(DolphinModel::Rating); hideColumn(DolphinModel::Tags); header()->hide(); - } - else if (event->type() == QEvent::UpdateRequest) { + break; + + case QEvent::Show: + // TODO: The opening/closing animation of subtrees flickers in combination with the + // sidebar when using the Oxygen style. As workaround the animation is turned off: + setAnimated(false); + break; + + case QEvent::UpdateRequest: // a wheel movement will scroll 1 item if (model()->rowCount() > 0) { verticalScrollBar()->setSingleStep(sizeHintForRow(0) / 3); } + break; + + default: + break; } return KTreeView::event(event);