mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
Fix crash when load multi systray
This commit is contained in:
parent
58902d6274
commit
13a2fb8ec5
@ -81,6 +81,8 @@ void DockLayout::sortRightToLeft()
|
||||
|
||||
bool DockLayout::hasSpacingItemInList()
|
||||
{
|
||||
if (sortDirection == RightToLeft)
|
||||
return false;
|
||||
if (appList.count() <= 1)
|
||||
return false;
|
||||
if (appList.at(0)->x() > itemSpacing)
|
||||
@ -165,7 +167,7 @@ int DockLayout::getContentsWidth()
|
||||
tmpWidth += appList.at(i)->width();
|
||||
}
|
||||
|
||||
if (hasSpacingItemInList())
|
||||
if (hasSpacingItemInList() && tmpAppMap.firstKey())
|
||||
tmpWidth += tmpAppMap.firstKey()->width() + itemSpacing;
|
||||
|
||||
return tmpWidth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user