-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Implemented "View In List" #719
Conversation
The new option should only be shown when you've right-clicked a handle, not when you've right-clicked a tag editor. I suggest making it so if you right-click on a handle, it passes some context to the Indications.gd method, for example "viewport", which is then checked against to decide if the option should be there.
I'd say, we should have a fixed offset for where the selected tag would be, for example 20% of the tag container's height. The metric you've mentioned here can be user-defined, for example with a lot of unrecognized tags, to the point where the path command can end up outside of the screen. |
…n right clicking a tag frame
…ther than at the very top.
|
||
if context == SELECTION_CONTEXT.VIEWPORT: | ||
btn_arr.append(Utils.create_btn(TranslationServer.translate("View In List"), | ||
view_in_list.bind(selected_tids[0]), false, load("res://visual/icons/ViewInList.svg"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bit of oddness in doing this with selected_tids[0]
when you have a multiselection, but it's not that important. I'll squash this eventually.
src/Indications.gd
Outdated
@@ -456,8 +463,12 @@ func insert_inner_after_selection(new_command: String) -> void: | |||
path_attrib.insert_command(last_selection + 1, new_command) | |||
normal_select(semi_selected_tid, last_selection + 1) | |||
|
|||
enum SELECTION_CONTEXT { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the enum must be PascalCase.
You need to run the update_translations.gd script to add the new string. |
Thanks! |
Adds a "View In List" option when right-clicking a handle. This will scroll the tag list so that the selected tag is at the top of the view. If the selected handle is an inner command, the scroll will be offset based on its position, such that the first inner command will have the selected tag at the top of the view.