projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed an endless redraw loop on GTK
[Mograsim.git]
/
plugins
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
LogicExecuter.java
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
index
52adeba
..
a7f8c83
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicExecuter.java
@@
-67,7
+67,7
@@
public class LogicExecuter
}
}
catch (@SuppressWarnings("unused") InterruptedException e)
}
}
catch (@SuppressWarnings("unused") InterruptedException e)
- {// do nothing; it is normal execution flow to be interrupted
+ {
// do nothing; it is normal execution flow to be interrupted
}
}
}
}
}
}
@@
-83,8
+83,11
@@
public class LogicExecuter
timeline.addEventAddedListener(event ->
{
if (isRunningLive.get())
timeline.addEventAddedListener(event ->
{
if (isRunningLive.get())
- if (Timeline.timeCmp(event.getTiming(), nextExecSimulTime.get()) < 0)
+ {
+ long nextExecSimulTime = this.nextExecSimulTime.get();
+ if (nextExecSimulTime == -1 || Timeline.timeCmp(event.getTiming(), nextExecSimulTime) < 0)
simulationThread.interrupt();
simulationThread.interrupt();
+ }
});
// not optimal; but we don't expect this to happen very often
tf.addSimulTimeToRealTimeFactorChangedListener(d -> simulationThread.interrupt());
});
// not optimal; but we don't expect this to happen very often
tf.addSimulTimeToRealTimeFactorChangedListener(d -> simulationThread.interrupt());