mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
Fix item add after init can't show
This commit is contained in:
parent
ee40afb328
commit
d566addbce
@ -28,6 +28,8 @@ void AppManager::slotEntryAdded(const QDBusObjectPath &path)
|
||||
DBusEntryProxyer *entryProxyer = new DBusEntryProxyer(path.path());
|
||||
if (entryProxyer->isValid())
|
||||
{
|
||||
if (entryProxyer->data().value("title") == "dde-dock")
|
||||
return;
|
||||
AppItem *item = new AppItem();
|
||||
item->setEntryProxyer(entryProxyer);
|
||||
emit entryAdded(item);
|
||||
|
@ -141,10 +141,11 @@ void Panel::slotRemoveAppItem(const QString &id)
|
||||
if (tmpItem->itemId() == id)
|
||||
{
|
||||
//TODO,remove from layout
|
||||
leftLayout->removeItem(i);
|
||||
qWarning() << "=====" << leftLayout->getItemCount();
|
||||
return;
|
||||
}
|
||||
}
|
||||
qWarning() << "=====" << leftLayout->getItemCount();
|
||||
}
|
||||
|
||||
void Panel::mousePressEvent(QMouseEvent *event)
|
||||
|
@ -15,6 +15,7 @@ void DockLayout::addItem(AbstractDockItem *item)
|
||||
void DockLayout::insertItem(AbstractDockItem *item, int index)
|
||||
{
|
||||
item->setParent(this);
|
||||
item->show();
|
||||
int appCount = appList.count();
|
||||
index = index > appCount ? appCount : (index < 0 ? 0 : index);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user