Skip to content

Commit 2ac5b74

Browse files
committed
Merge pull request #299 from JordanMartinez/removeUnneededDisposal
Remove unneeded disposal method from behavior
2 parents 7e55428 + da2fd32 commit 2ac5b74

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

richtextfx/src/main/java/org/fxmisc/richtext/StyledTextArea.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,6 @@ public void positionCaret(int pos) {
10071007
public void dispose() {
10081008
subscriptions.unsubscribe();
10091009
model.dispose();
1010-
behavior.dispose();
10111010
virtualFlow.dispose();
10121011
}
10131012

richtextfx/src/main/java/org/fxmisc/richtext/StyledTextAreaBehavior.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,6 @@ private enum DragState {
209209

210210
private final StyledTextAreaModel<?, ?> model;
211211

212-
private final Subscription subscription;
213-
214-
215212
/**
216213
* Indicates whether selection is being dragged by the user.
217214
*/
@@ -241,7 +238,6 @@ private CaretOffsetX getTargetCaretOffset() {
241238
this.model = area.getModel();
242239

243240
InputMapTemplate.installFallback(EVENT_TEMPLATE, this, b -> b.view);
244-
subscription = () -> InputMapTemplate.uninstall(EVENT_TEMPLATE, this, b -> b.view);
245241

246242
// setup auto-scroll
247243
Val<Point2D> projection = Val.combine(
@@ -264,14 +260,6 @@ private CaretOffsetX getTargetCaretOffset() {
264260
});
265261
}
266262

267-
/* ********************************************************************** *
268-
* Public API (from Behavior) *
269-
* ********************************************************************** */
270-
271-
public void dispose() {
272-
subscription.unsubscribe();
273-
}
274-
275263
/* ********************************************************************** *
276264
* Key handling implementation *
277265
* ********************************************************************** */

0 commit comments

Comments
 (0)