mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +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());
|
DBusEntryProxyer *entryProxyer = new DBusEntryProxyer(path.path());
|
||||||
if (entryProxyer->isValid())
|
if (entryProxyer->isValid())
|
||||||
{
|
{
|
||||||
|
if (entryProxyer->data().value("title") == "dde-dock")
|
||||||
|
return;
|
||||||
AppItem *item = new AppItem();
|
AppItem *item = new AppItem();
|
||||||
item->setEntryProxyer(entryProxyer);
|
item->setEntryProxyer(entryProxyer);
|
||||||
emit entryAdded(item);
|
emit entryAdded(item);
|
||||||
|
@ -141,10 +141,11 @@ void Panel::slotRemoveAppItem(const QString &id)
|
|||||||
if (tmpItem->itemId() == id)
|
if (tmpItem->itemId() == id)
|
||||||
{
|
{
|
||||||
//TODO,remove from layout
|
//TODO,remove from layout
|
||||||
|
leftLayout->removeItem(i);
|
||||||
|
qWarning() << "=====" << leftLayout->getItemCount();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qWarning() << "=====" << leftLayout->getItemCount();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panel::mousePressEvent(QMouseEvent *event)
|
void Panel::mousePressEvent(QMouseEvent *event)
|
||||||
|
@ -15,6 +15,7 @@ void DockLayout::addItem(AbstractDockItem *item)
|
|||||||
void DockLayout::insertItem(AbstractDockItem *item, int index)
|
void DockLayout::insertItem(AbstractDockItem *item, int index)
|
||||||
{
|
{
|
||||||
item->setParent(this);
|
item->setParent(this);
|
||||||
|
item->show();
|
||||||
int appCount = appList.count();
|
int appCount = appList.count();
|
||||||
index = index > appCount ? appCount : (index < 0 ? 0 : index);
|
index = index > appCount ? appCount : (index < 0 ? 0 : index);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user