mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +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
2a612e12ce
commit
82ea33762f
|
@ -73,8 +73,16 @@ Qt::Orientation KItemListViewLayouter::scrollOrientation() const
|
|||
void KItemListViewLayouter::setSize(const QSizeF& 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_dirty = true;
|
||||
m_visibleIndexesDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue