Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

fixed syncronized scrolling (did not always work when activating an alreay opened tab)

AuthorKarl Tauber <email>
Date2015-07-29 11:22:48 GMT+0200
Commit13238a97c09a044362e488aba8318e00fd62537c
Parentab48211
Delta2 lines added, 1 line removed, 1-line increase
src/main/java/org/markdownwriterfx/editor/MarkdownEditorPane.java
import javafx.application.Platform;
+import javafx.beans.InvalidationListener;
import javafx.beans.property.ReadOnlyDoubleProperty;
import javafx.beans.property.ReadOnlyDoubleWrapper;
// search for vertical scrollbar and add change listener to update 'scrollY' property
- Platform.runLater(() -> {
+ textArea.getChildrenUnmodifiable().addListener((InvalidationListener) e -> {
ScrollBar vScrollBar = Utils.findVScrollBar(textArea);
if (vScrollBar != null) {