-
-
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
undo of LaTeX -> UTF conversion fails #2973
Comments
It seems that the undo/redo operations of all right-click operations in the entry editor got lost when rewriting the entry editor with JavaFX. @tobiasdiez The undo is working for the field contents themselves. Could you give a hint on how the undo is supported there so that we can replicate it with the right-click menu? |
I have no idea why undo works for the fields :-) Maybe there is global listener for field changes that adds them automatically as undo operations? Up to now no JavaFX code works with the undo/redo mechanism (the corresponding code is still commented-out in the groups interface). The reason was/is that I want to replace our undo facilities with a library (maybe https://github.com/TomasMikula/UndoFX). |
I've looked into this for a while, but without getting something to work unfortunately. The undo works for the fields right now, because the JavaFX TextArea comes with a default undo implementation, but if you change focus after the edit, the undo is lost. This is bad. Undo/Redo is practically non-existent in the entry editor. And after some more thought: I think we need to figure out how to use the existing undo manager with JavaFX. |
In fact, the RichTextFX already makes use of the UndoFX library mentioned above. |
Unfortunately, it is not that easy. We still have a swing-based undo manager in place that can undo things like adding a new entry into the main table. Either we integrate that with a new undo library, or we rewrite everything undo-related with the new library. Any way, this won't be straight-forward. |
So this is a blocker for a 4.0 release. @tobiasdiez Do you see any chance of getting this done in the not-too-far-off future? |
At the moment I am getting an exception:
|
No, it's not related to the dirty-marking, but to the undo facilities. It happens when you press undo, but there are no undo event registered in the manager (and since the entry editor does not produce undo events at the moment, this is highly likely) |
This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! I just applied a quick and a bit hacky fix. We should try to replace the undo framework nonetheless. |
How to reproduce:
add doi 10.1088/0953-8984/27/44/446001
which provides
Now click with the right mouse button on the title and convert LaTeX -> UTF
Finally try undo. It does not work. The conversion function "forgot" to save before changing.
It should be undoable.
The text was updated successfully, but these errors were encountered: