ISSUE-2082: Add repeat support for bindings API - #3318
Conversation
|
@mwestphal @snoyer Here's a draft of changes. I didn't add any tests yet because I wanted to make sure this is the right path, and that any defaults to existing bindings we want applied are setup first. Let me know what you think! |
| const BindingCommands binding = commandsIt->second; | ||
|
|
||
| for (const std::string& command : binding.CommandVector) | ||
| if (binding.Repeat || rwi->GetRepeatCount() <= 1) |
There was a problem hiding this comment.
Went with <= here in case VTK can support starting the repeat count at 0. Can switch the logic if we'd like.
There was a problem hiding this comment.
will need updated once VTK changes indeed.
|
You are modifying libf3d public API! |
|
@mwestphal Still need the VTK bump first, but would love to get your thoughts on:
|
Actually no, default should be false, only a select few should be true.
Yes |
| KeyPressEvent 1591 863 1 80 9 P 0 | ||
| KeyPressEvent 1591 863 1 80 10 P 0 | ||
| KeyReleaseEvent 1591 863 1 80 1 P 0 | ||
|
|
| KeyPressEvent 1591 863 1 80 9 P 0 | ||
| KeyPressEvent 1591 863 1 80 10 P 0 | ||
| KeyReleaseEvent 1591 863 1 80 1 P 0 | ||
|
|
mwestphal
left a comment
There was a problem hiding this comment.
last changes, but needs the VTK uniformization of behavior before merge I think.
Describe your changes
Add repeat support for bindings API. If you set
repeatto false, it will ignore repeated key presses from holding down the key. Otherwise it will keep applying the binding behavior (i.e. increase light intensity). Please note this work requires VTK changes.Issue ticket number and link if any
#2082
Checklist for finalizing the PR
.github/workflows/versions.json, I have updateddocker_timestampAI Disclosure
Continuous integration
Please write a comment to run CI, eg:
\ci fast.See here for more info.