Fixing a bug in `SimpleViewOnlyStyledModel.lastParagraph()` which breaks adding 
text segments after a `Region`-based paragraph.

Test cases:

    @Test
    public void addTextAfterRegion() {
        SimpleViewOnlyStyledModel m = new SimpleViewOnlyStyledModel();
        m.addParagraph(() -> new Region());
        m.addNodeSegment(() -> new Region());
        assertEquals(2, m.size());
    }

    @Test
    public void addTextAfterRegionAfterText() {
        SimpleViewOnlyStyledModel m = new SimpleViewOnlyStyledModel();
        m.addNodeSegment(() -> new Region());
        m.addParagraph(() -> new Region());
        m.addSegment("text");
        assertEquals(3, m.size());
    }

-------------

Commit messages:
 - fix

Changes: https://git.openjdk.org/jfx/pull/1983/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1983&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8372438
  Stats: 83 lines in 2 files changed: 67 ins; 0 del; 16 mod
  Patch: https://git.openjdk.org/jfx/pull/1983.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1983/head:pull/1983

PR: https://git.openjdk.org/jfx/pull/1983

Reply via email to