Scrollpane location in changed when element is redrawn
Bug #1828782 reported by
Kenneth Yrke Jørgensen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TAPAAL |
Fix Released
|
Critical
|
Kenneth Yrke Jørgensen | ||
Dev |
Fix Released
|
Critical
|
Kenneth Yrke Jørgensen |
Bug Description
-Draw a net with a horisontal scroll pane, (or zoom on a net, or make a small window).
-Select any location on the scroll pane.
-Click any location on the drawing surface (or any other option that will trigger a redraw)
Scrollpane will now jump to a "random" location.
Related branches
lp:~yrke/tapaal/tapaaldev-fix1828782
(Merged)
Changed in tapaal: | |
status: | Confirmed → Fix Released |
status: | Fix Released → Fix Committed |
Changed in tapaal: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The issue is found when any element with an pnLable is redraw/updated.
The update function will call setName/setText on the lable.
This function will call setSize()
setSize invalidates the element and redraws it.
Standard behavior for a JTextComponent is to move any parent JScroll list to the location of the label updated (See https:/ /docs.oracle. com/javase/ 7/docs/ api/javax/ swing/text/ JTextComponent. html)
Set licy(DefaultCar et.NEVER_ UPDATE) ;
DefaultCaret c = new DefaultCaret();
c.setUpdatePo
setCaret(c);
to overwrite this behavior.