mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Deferred mote height calculation until components are initialized
This commit is contained in:
parent
99f3d5ada2
commit
5288ac12b5
@ -229,12 +229,6 @@ public class TimeLine extends VisPlugin {
|
||||
});
|
||||
eventCheckboxes.add(eventCheckBox);
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
recalculateMoteHeight();
|
||||
}
|
||||
});
|
||||
|
||||
/* Panel: timeline canvas w. scroll pane and add mote button */
|
||||
timeline = new Timeline();
|
||||
timelineScrollPane = new JScrollPane(
|
||||
@ -268,6 +262,7 @@ public class TimeLine extends VisPlugin {
|
||||
|
||||
getContentPane().add(splitPane);
|
||||
|
||||
recalculateMoteHeight();
|
||||
pack();
|
||||
setSize(gui.getDesktopPane().getWidth(), 150);
|
||||
setLocation(0, gui.getDesktopPane().getHeight() - 150);
|
||||
@ -1198,10 +1193,12 @@ public class TimeLine extends VisPlugin {
|
||||
if (showWatchpoints) {
|
||||
h += EVENT_PIXEL_HEIGHT;
|
||||
}
|
||||
if (h != paintedMoteHeight) {
|
||||
paintedMoteHeight = h;
|
||||
timelineMoteRuler.repaint();
|
||||
timeline.repaint();
|
||||
}
|
||||
}
|
||||
|
||||
public void closePlugin() {
|
||||
/* Remove repaint timer */
|
||||
|
Loading…
Reference in New Issue
Block a user