fix crash when drag in other item

Change-Id: I0c29d39d72aad0be96cfde83b2c3f13e5eb45225
This commit is contained in:
石博文 2016-06-23 14:38:54 +08:00 committed by Hualet Wang
parent 8d63061963
commit 197d10471c

View File

@ -80,10 +80,13 @@ void MainPanel::resizeEvent(QResizeEvent *e)
void MainPanel::dragEnterEvent(QDragEnterEvent *e)
{
// TODO: check
DockItem *dragSourceItem = qobject_cast<DockItem *>(e->source());
if (!dragSourceItem)
return;
e->accept();
if (qobject_cast<DockItem *>(e->source()))
if (dragSourceItem)
DragingItem->show();
}