fix: 拖动任务栏上的图标移动后,"remove"按钮残留在桌面上

原因是因为单指移动任务栏拖拽应用图标的时候,出现了多点触碰屏幕,导致
界面残留拖拽提示的问题。解决的方法是当发生多点触控时,直接隐藏拖拽
应用

Log: 拖动任务栏上的图标移动后,"remove"按钮残留在桌面上
Bug: https://pms.uniontech.com/zentao/bug-view-40987.html
Change-Id: I505454c7457b49fb7c1e9c332d8750b1003b1608
Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/3848
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com>
Reviewed-by: niecheng <niecheng@uniontech.com>
Tested-by: <mailman@uniontech.com>
This commit is contained in:
wangnengdeng 2020-09-07 15:01:27 +08:00
parent 1611be8c84
commit c5d0d698af
2 changed files with 9 additions and 0 deletions

View File

@ -363,3 +363,11 @@ bool AppDragWidget::isRemoveAble()
}
return false;
}
void AppDragWidget::enterEvent(QEvent *event)
{
if (m_goBackAnim->state() != QPropertyAnimation::State::Running
&& m_animGroup->state() != QParallelAnimationGroup::Running) {
hide();
}
}

View File

@ -55,6 +55,7 @@ protected:
void dragMoveEvent(QDragMoveEvent *event) override;
void dropEvent(QDropEvent *event) override;
void hideEvent(QHideEvent *event) override;
void enterEvent(QEvent *event);
private:
void initAnimations();