Destroy overlay in ~DraggableWidget destructor

There is an issue where we can drag a recent item and load a file
(using Alt+F or Ctrl+O) while dragging the recent item. With this
commit the overlay is destroyed after the file is open (without this
the overlay is kept floating).

Probably related to #3504 but we're not sure.
This commit is contained in:
David Capello 2022-11-08 21:14:12 -03:00
parent 4643aa6a1b
commit 551aae36c4

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2021 Igara Studio S.A.
// Copyright (C) 2018-2022 Igara Studio S.A.
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
@ -26,6 +26,11 @@ public:
template<typename...Args>
DraggableWidget(Args...args) : Base(args...) { }
~DraggableWidget() {
if (m_floatingOverlay)
destroyFloatingOverlay();
}
bool onProcessMessage(ui::Message* msg) override {
switch (msg->type()) {