mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
hide preview if its empty
Change-Id: I04af518c834d26603de05a7ae7021fedc0c56675
This commit is contained in:
parent
e69ffc5ae5
commit
023ed668e9
Notes:
Deepin Code Review
2017-05-03 16:57:30 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Wed, 03 May 2017 16:57:28 +0800 Reviewed-on: https://cr.deepin.io/22790 Project: dde/dde-dock Branch: refs/heads/master
@ -25,6 +25,14 @@ void PreviewContainer::setWindowInfos(const WindowDict &infos)
|
|||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (infos.isEmpty())
|
||||||
|
{
|
||||||
|
emit requestCancelPreview();
|
||||||
|
emit requestHidePreview();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto it(infos.cbegin()); it != infos.cend(); ++it)
|
for (auto it(infos.cbegin()); it != infos.cend(); ++it)
|
||||||
{
|
{
|
||||||
PreviewWidget *w = new PreviewWidget(it.key());
|
PreviewWidget *w = new PreviewWidget(it.key());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user