mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 02:13:55 +00:00
moved null check; added synchronization to avoid concurrency issues when debugging in Java VM
This commit is contained in:
1 parent
ba537b6f20
commit
9db11ef186
2 files changed
+4
-4
No files matched your search
+1
-1
@@ -523,7 +523,7 @@ implements CompetitorSelectionChangeListener, RaceSelectionChangeListener, TimeL
|
||||
if (getChartData() != null) {
|
||||
Date newestEvent = getChartData().getOldestDateOfNewestData();
|
||||
if (hasVisibleCompetitors()
|
||||
&& ((newestEvent.before(date) && (date.getTime() - newestEvent.getTime()) >= getStepSize()) || newestEvent == null)) {
|
||||
&& (newestEvent == null || (newestEvent.before(date) && (date.getTime() - newestEvent.getTime()) >= getStepSize()))) {
|
||||
loadData(false);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -636,7 +636,7 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
|
||||
* @param curValue
|
||||
* the current value
|
||||
*/
|
||||
public void setCurrentValue(Double curValue) {
|
||||
public synchronized void setCurrentValue(Double curValue) {
|
||||
setCurrentValue(curValue, true);
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
|
||||
* @param fireEvent
|
||||
* fire the onValue change event if true
|
||||
*/
|
||||
public void setCurrentValue(Double curValue, boolean fireEvent) {
|
||||
public synchronized void setCurrentValue(Double curValue, boolean fireEvent) {
|
||||
// Confine the value to the range
|
||||
if (!isMinMaxInitialized() || curValue == null) {
|
||||
return;
|
||||
@@ -1088,7 +1088,7 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
|
||||
/**
|
||||
* Reset the progress to constrain the progress to the current range and redraw the knob as needed.
|
||||
*/
|
||||
private void resetCurrentValue() {
|
||||
private synchronized void resetCurrentValue() {
|
||||
setCurrentValue(getCurrentValue());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user