mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +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()
|
bool DockLayout::hasSpacingItemInList()
|
||||||
{
|
{
|
||||||
|
if (sortDirection == RightToLeft)
|
||||||
|
return false;
|
||||||
if (appList.count() <= 1)
|
if (appList.count() <= 1)
|
||||||
return false;
|
return false;
|
||||||
if (appList.at(0)->x() > itemSpacing)
|
if (appList.at(0)->x() > itemSpacing)
|
||||||
@ -165,7 +167,7 @@ int DockLayout::getContentsWidth()
|
|||||||
tmpWidth += appList.at(i)->width();
|
tmpWidth += appList.at(i)->width();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasSpacingItemInList())
|
if (hasSpacingItemInList() && tmpAppMap.firstKey())
|
||||||
tmpWidth += tmpAppMap.firstKey()->width() + itemSpacing;
|
tmpWidth += tmpAppMap.firstKey()->width() + itemSpacing;
|
||||||
|
|
||||||
return tmpWidth;
|
return tmpWidth;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user