repaint quirks

This commit is contained in:
Manindra Moharana
2013-06-30 01:48:10 +05:30
parent 4fe3de6ee3
commit 6d3629305b
2 changed files with 7 additions and 5 deletions

View File

@@ -300,6 +300,7 @@ public class ErrorCheckerService implements Runnable{
updateErrorTable();
editor.updateErrorBar(problemsList);
updateEditorStatus();
editor.getTextArea().repaint();
updatePaintedThingys();
int x = textModified.get();
//System.out.println("TM " + x);
@@ -698,15 +699,15 @@ public class ErrorCheckerService implements Runnable{
/**
* Repaints the textarea if required
*/
public void updatePaintedThingys() {
editor.getTextArea().repaint();
updateEditorStatus();
public void updatePaintedThingys() {
currentTab = editor.getSketch().getCodeIndex(
editor.getSketch().getCurrentCode());
//System.out.println("awesome! " + currentTab + " LT " + lastTab);
//System.out.println("Tab changed " + currentTab + " LT " + lastTab);
if (currentTab != lastTab) {
textModified.incrementAndGet();
textModified.set(5);
lastTab = currentTab;
editor.getTextArea().repaint();
updateEditorStatus();
return;
}