How to disable drag box selection in GraphEditor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Szesan

In the GraphEdit container when I hold down the mouse button a rectangle box selection behavior is triggered, which I want to get rid off. However even though I have overriden the mouse input event, the behavior still persists.

Any tips?


:bust_in_silhouette: Reply From: Szesan

I have figured out the answer:

Overriding the input handler is not enough, because the event bubbles through the SceneTree anyway.

I had to specifically call SetInputAsHandled() on the Scenetree.

In C# it looks like this:

if (@event is InputEventMouseButton eventMouseButton)