fixed(dde-dock): plugin's sequence is error for bug 10319

This commit is contained in:
wangxuwen 2019-12-27 13:04:56 +08:00
parent addbba85d2
commit 84b3d7a74e

View File

@ -260,7 +260,13 @@ void DockItemManager::pluginItemInserted(PluginsItem *item)
Q_ASSERT(pItem);
const int sortKey = pItem->itemSortKey();
if (sortKey != -1 && itemSortKey > sortKey)
if (pluginType == DockItem::FixedPlugin) {
if (sortKey != -1 && itemSortKey > sortKey)
continue;
insertIndex = i - 1;
break;
}
if (sortKey != -1 && itemSortKey > sortKey && pItem->itemType() != DockItem::FixedPlugin)
continue;
insertIndex = i - 1;
break;