mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复控制中心显示多条重复控件的问题
原因:插件在多次调用itemAdded方法,导致条件到列表中的控件重复 修改:过滤掉重复加载的插件,保证同一个插件在控制中心只显示一次 Log: Influence: 控制中心-个性化,观察蓝牙或者任务栏等插件是否只显示一次 Bug: https://pms.uniontech.com/bug-view-171581.html Change-Id: I52912c0c51159df1f84ed16dcbe891c346a6bfaa
This commit is contained in:
parent
f11366a27d
commit
224066836a
@ -86,6 +86,10 @@ void AbstractPluginsController::removeValue(PluginsItemInterface *const itemInte
|
||||
void AbstractPluginsController::itemAdded(PluginsItemInterface * const itemInter, const QString &itemKey)
|
||||
{
|
||||
PluginsItemInterface *pluginItem = getPluginInterface(itemInter);
|
||||
|
||||
if (m_pluginExists.contains(pluginItem))
|
||||
return;
|
||||
|
||||
PluginAdapter *pluginAdapter = dynamic_cast<PluginAdapter *>(pluginItem);
|
||||
if (pluginAdapter)
|
||||
pluginAdapter->setItemKey(itemKey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user