kamalchopra / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

SyntaxTester - toggle line numbers problem #176

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the JSyntaxPane Tester
2. Click "Toggle line numbers", then click it again (disable then enable)
3. The line numbers are now partly obscured until an event like keypress happens

What version of the product are you using? On what operating system?

r095, Windows

Original issue reported on code.google.com by eliben on 4 Jun 2011 at 6:15

GoogleCodeExporter commented 9 years ago
I should add about (3) that just moving the cursor doesn't make it go back to 
normal view. Editing the document (pressing Enter or other key) does.

Original comment by eliben on 4 Jun 2011 at 7:21

GoogleCodeExporter commented 9 years ago
I think the problem is that setPreferredWidth() isn't called in 
LineNumbersRuler.install(), but only in LineNumbersRuler().documentChanged()

Adding a call to setPreferredWidth() in LineNumbersRuler.install(), right 
before the call to repaint(), fixes the problem.

Original comment by eliben on 4 Jun 2011 at 7:27