[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/apps/plasma/applets/folderview
From: Fredrik Höglund <fredrik () kde ! org>
Date: 2010-01-04 23:35:32
Message-ID: 1262648132.174847.1354.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1070135 by fredrik:
Correctly handle the case where the content margins are changed after
the saved icons positions are loaded, but before the layout process
is completed.
M +16 -0 iconview.cpp
--- trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp #1070134:1070135
@@ -2203,6 +2203,22 @@
qreal left, top, right, bottom;
getContentsMargins(&left, &top, &right, &bottom);
+ if (!m_savedPositions.isEmpty()) {
+ // If the contents margins change while a layout with saved positions is
+ // in progress, we have to adjust all the saved positions and restart \
the + // layout process. The saved positions are relative to the top left \
corner + // of the content area.
+ const QPoint delta(left - m_margins[Plasma::LeftMargin], top - \
m_margins[Plasma::TopMargin]); + QMutableHashIterator<QString, QPoint> \
i(m_savedPositions); + while (i.hasNext()) {
+ i.next();
+ i.setValue(i.value() + delta);
+ }
+ m_validRows = 0;
+ m_delayedLayoutTimer.start(10, this);
+ m_delayedCacheClearTimer.start(5000, this);
+ }
+
if (m_validRows == 0) {
m_margins[Plasma::LeftMargin] = left;
m_margins[Plasma::TopMargin] = top;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic