rokups / ImNodes

Node graph implementation for Dear ImGui. Used in https://github.com/rokups/rbfx
MIT License
668 stars 57 forks source link

Can only select nodes with rectangle select #6

Closed sphaero closed 5 years ago

sphaero commented 5 years ago

Any reason why a node is not selectable by just clicking on it? The only way now is by using the rectangle select.

rokups commented 5 years ago

They were selectable by clicking at some point. Must be a bug :]

sphaero commented 5 years ago

It might have to do with: https://github.com/rokups/ImNodes/blob/e3431ce8bad2d68e52f728edd14aebaac7e8727b/ImNodes.cpp#L473

IsAnyItemActive always returns true at that specific moment, removing the exclamation does make it selectable by click again. I'm just not sure why there was IsAnyItemActive test in the first place.