-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding key action to move entry boundary to cursour position under multiple entries editing mode #45
Comments
Thank you for your idea and work! Another idea: |
For naming, maybe And I would say it kindda make sense to correspond If you have any other advice or suggestion, please let me know. |
After some attempts, and try editing with this new key action, I found out that maybe seperate And |
I think it's good to have both
About how to access the current entry: |
Sorry I am not sure what you are asking. Maybe you can open a PR if you already have most of the code, and we can discuss on the PR. It will be more easy for me to help testing. For other two features, samely, if you already have code, PR is better, if not, you can open new issues for each 😄 |
Why
In oto, there is default key action to set certain parameter to cursor position, beacuse of its fields are set. While in textgrid is different, with no preset fields and fields numbers, so the default key action would not work. I want to add a similar feature to move parameter line by key action.
What
In details, two key action,
Move Boundary Forward To Cursor Position
andMove Boundary Backward To Cursor Position
would be added, and what they do, is base on current cursor position, move the boundary line after or before the cursor position (corresponding move forward and backward) to the cursor position.I wrote a little demo to show how it may works (only move forward is implemented)
In demostration, I use a key action to move three parameter lines forward to current cursor position. If this feature is welcome, I would like to complete it and notify with a pull request.
Where
This change only work under multiple entries mode, which means single entry mode like editing oto would not be affected. Currently I only test on textgrid, but I assume labeler that edit
lab
file would also work.Customize these key action and corrrespondent Simplified Chinese translation would also be added.
How
To implentment the main functionalty, I would modify
getUpdatedEntriesByKeyAction
incom.sdercolin.vlabeler.ui.edior.labeler.marker.MarkerState.kt
, when the size ofentries
is more than 1 it would excute some other code, instead of early return. Also, to locate entry base on cursor position, anthor function would be added inMarkerState
class, which would return the entry and its index. Beside, fix-drag would not be consider since this has little pratical meaning.Additional context
Please let me know if there is any problem or lack of consideration, thanks.
The text was updated successfully, but these errors were encountered: