Stop drag actions in the TileMapLayer and GridMap editors when focus is lost
This commit is contained in:
parent
778cf54dab
commit
bbacc674b8
2 changed files with 10 additions and 2 deletions
|
|
@ -1334,8 +1334,8 @@ void GridMapEditor::_notification(int p_what) {
|
|||
} break;
|
||||
|
||||
case NOTIFICATION_APPLICATION_FOCUS_OUT: {
|
||||
if (input_action == INPUT_PAINT) {
|
||||
// Simulate mouse released event to stop drawing when editor focus exists.
|
||||
if (input_action == INPUT_PAINT || input_action == INPUT_ERASE || input_action == INPUT_SELECT) {
|
||||
// Simulate mouse released event to stop drawing when editor focus exits.
|
||||
Ref<InputEventMouseButton> release;
|
||||
release.instantiate();
|
||||
release->set_button_index(MouseButton::LEFT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue