-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Prevent the search to get focus when deleting/pasting an entry #2211
Conversation
Now it works for cutting entries too. |
@@ -783,7 +785,10 @@ private void delete() { | |||
getUndoManager().addEdit(compound); | |||
|
|||
markBaseChanged(); | |||
frame.output(formatOutputMessage(Localization.lang("Deleted"), entries.size())); | |||
frame.output(formatOutputMessage(!cut ? Localization.lang("Deleted") : Localization.lang("Cut"), entries.size())); | |||
|
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.
Either you change the condition and put cut instead of not cut or you wrap it in if and else
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.
I changed it to cut (but didn't change the semantic').
@@ -183,11 +183,10 @@ public void editSignalled() { | |||
|
|||
public void editSignalled(BibEntry entry) { | |||
final BasePanelMode mode = panel.getMode(); | |||
EntryEditor editor = panel.getEntryEditor(entry); |
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.
Why did you change this?
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 new editor was only needed if the condition was met, and previously the focus was possibly set to the wrong editor (if the condition wasn't met).
To me code looks good :+2: |
Fixes: #2208
When you delete an entry the focus will no longer jump to the searchbar, instead it will select the next entry (also counts for pasting).