Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
d44d8257
Commit
d44d8257
authored
Dec 02, 2019
by
Daniel Lehmberg
Browse files
Merge branch 'fix-gui-deadlock' into 'master'
call fireChangeViewportEvent from awt Event Thread See merge request
!96
parents
b564e158
ef457470
Pipeline
#187988
passed with stages
in 126 minutes and 52 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
VadereGui/src/org/vadere/gui/onlinevisualization/model/OnlineVisualizationModel.java
View file @
d44d8257
package
org.vadere.gui.onlinevisualization.model
;
import
java.awt.*
;
import
java.awt.geom.Rectangle2D
;
import
java.util.ArrayList
;
import
java.util.Collection
;
...
...
@@ -140,8 +141,12 @@ public class OnlineVisualizationModel extends SimulationModel<DefaultSimulationC
if
(
topography
==
null
)
{
topography
=
observationAreaSnapshot
.
scenario
;
fireChangeViewportEvent
(
new
Rectangle2D
.
Double
(
topography
.
getBounds
().
x
,
topography
.
getBounds
().
y
,
topography
.
getBounds
().
width
,
topography
.
getBounds
().
height
));
// recalculate GUI (fireChangeViewportEvent will synchronize on model which is also
// needed by some awt event. Therefore do this in EDT (Event Dispatching Thread)
EventQueue
.
invokeLater
(()
->
{
fireChangeViewportEvent
(
new
Rectangle2D
.
Double
(
topography
.
getBounds
().
x
,
topography
.
getBounds
().
y
,
topography
.
getBounds
().
width
,
topography
.
getBounds
().
height
));
});
}
else
{
topography
=
observationAreaSnapshot
.
scenario
;
}
...
...
VadereSimulator/src/org/vadere/simulator/control/simulation/Simulation.java
View file @
d44d8257
...
...
@@ -247,9 +247,9 @@ public class Simulation {
}
preLoop
();
logger
.
info
(
"preLoop finished."
);
while
(
isRunSimulation
)
{
synchronized
(
this
)
{
while
(
isPaused
)
{
try
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment