mirror of
https://github.com/aseprite/aseprite.git
synced 2024-07-19 03:17:28 +00:00
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:
parent
4643aa6a1b
commit
551aae36c4
|
@ -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()) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user