Skip to content

Allow UndoManager to use developer-defined changes (text, view, etc.)#528

Merged
JordanMartinez merged 1 commit intoFXMisc:masterfrom
JordanMartinez:extractUndo
Jun 22, 2017
Merged

Allow UndoManager to use developer-defined changes (text, view, etc.)#528
JordanMartinez merged 1 commit intoFXMisc:masterfrom
JordanMartinez:extractUndo

Conversation

@JordanMartinez
Copy link
Copy Markdown
Contributor

@JordanMartinez JordanMartinez commented Jun 22, 2017

Addresses #333

One cannot pass in an UndoManager as an argument since its apply Consumer requires the area to already be constructed. As such, the area still constructs the default UndoManager. However, once the area is constructed, this PR now allows one to set the area's undoManager directly and not indirectly through an UndoManagerFactory.
Thus, one has complete control over how the UndoManager is constructed and functions. It could only handle changes to the area's text, only changes to the area's view, or something else altogether.

Future PRs could add other factory methods for constructing UndoManagers that work differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant