mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Prevent some unnecessary layoutings when the view size is changed
In Icons/Details (Compact) View, no layouting is necessary if the view height (width) changes. REVIEW: 111322
This commit is contained in:
parent
b7669b6536
commit
1594edb157
|
@ -73,8 +73,16 @@ Qt::Orientation KItemListViewLayouter::scrollOrientation() const
|
||||||
void KItemListViewLayouter::setSize(const QSizeF& size)
|
void KItemListViewLayouter::setSize(const QSizeF& size)
|
||||||
{
|
{
|
||||||
if (m_size != size) {
|
if (m_size != size) {
|
||||||
|
if (m_scrollOrientation == Qt::Vertical) {
|
||||||
|
if (m_size.width() != size.width()) {
|
||||||
|
m_dirty = true;
|
||||||
|
}
|
||||||
|
} else if (m_size.height() != size.height()) {
|
||||||
|
m_dirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
m_size = size;
|
m_size = size;
|
||||||
m_dirty = true;
|
m_visibleIndexesDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue