From 7b6ace6466cf349a4ce7a080d5e978aa0a7043e2 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 24 Feb 2009 08:09:35 +0000 Subject: After renaming an item the view should be scrolled in a way to still have a fully visible renamed item. The implementation required a lot of more code changes as such a fix should require: QAbstractItemView::scrollTo() cannot be used directly (inconsistent default behavior in QListView and QTreeView, a special case for the column view), so the communication has to be done with the DolphinController... BUG: 185191 svn path=/trunk/KDE/kdebase/apps/; revision=930754 --- src/dolphindetailsview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/dolphindetailsview.cpp') diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index dd58e5842..fbd7e41d5 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -128,6 +128,8 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr this, SLOT(updateColumnVisibility())); connect(controller, SIGNAL(activationChanged(bool)), this, SLOT(slotActivationChanged(bool))); + connect(controller, SIGNAL(scrollToCurrentItem()), + this, SLOT(scrollToCurrentItem())); if (settings->useSystemFont()) { m_font = KGlobalSettings::generalFont(); @@ -866,6 +868,11 @@ void DolphinDetailsView::setFoldersExpandable(bool expandable) setItemsExpandable(expandable); } +void DolphinDetailsView::scrollToCurrentItem() +{ + scrollTo(currentIndex()); +} + void DolphinDetailsView::updateDecorationSize(bool showPreview) { DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); -- cgit v1.3