Skip to content

Commit

Permalink
fix nested pan handling
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jun 28, 2024
1 parent 891ac14 commit 23f9d49
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/hooks/EditorUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ struct EditorUIHook : Modify<EditorUIHook, EditorUI> {
using namespace keybinds;

this->template addEventListener<InvokeBindFilter>([=](InvokeBindEvent* event) {
if (event->isDown()) {
BrushManager::get()->m_panEditorInBrush = true;
}
else {
BrushManager::get()->m_panEditorInBrush = false;
if (!BrushManager::get()->m_panEditorInBrush) {
if (event->isDown()) {
BrushManager::get()->m_panEditorInBrush = true;
}
else {
BrushManager::get()->m_panEditorInBrush = false;
}
}
return ListenerResult::Propagate;
}, "pan-editor-in-brush"_spr);
Expand Down

0 comments on commit 23f9d49

Please sign in to comment.