diff --git a/src/java/pt/lsts/neptus/params/SystemProperty.java b/src/java/pt/lsts/neptus/params/SystemProperty.java index 82863b8d41..7913ec0af0 100644 --- a/src/java/pt/lsts/neptus/params/SystemProperty.java +++ b/src/java/pt/lsts/neptus/params/SystemProperty.java @@ -319,6 +319,17 @@ public void setTimeDirty(long timeDirty) { updatePropRenderer(); } + public boolean inSync() { + boolean sync; + if (timeDirty > timeSync || timeSync <= 0) { + sync = false; + } + else { + sync = true; + } + return sync; + } + private void updatePropRenderer() { if (this.renderer == null) return; @@ -326,12 +337,8 @@ private void updatePropRenderer() { if (!(renderer instanceof SystemPropertyRenderer)) return; - if (timeDirty > timeSync || timeSync <= 0) { - ((SystemPropertyRenderer) renderer).setPropertyInSync(false); - } - else { - ((SystemPropertyRenderer) renderer).setPropertyInSync(true); - } + boolean sync = inSync(); + ((SystemPropertyRenderer) renderer).setPropertyInSync(sync); } /* (non-Javadoc)