Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit ce962337 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

Merge branch 'master' of https://gitlab.lrz.de/vadere/vadere

parents 837ecc13 50f028be
......@@ -10,16 +10,20 @@ import org.vadere.gui.components.model.DefaultSimulationConfig;
import org.vadere.gui.components.model.SimulationModel;
public class ActionSetPedestrianColor extends ActionSetColor {
private final JComboBox<Integer> comboBox;
private final JComboBox<Integer> comboBox;
public ActionSetPedestrianColor(final String name, final SimulationModel<? extends DefaultSimulationConfig> model, final JPanel coloredPanel,
final JComboBox<Integer> comboBox) {
super(name, model, coloredPanel);
this.comboBox = comboBox;
}
public ActionSetPedestrianColor(final String name, final SimulationModel<? extends DefaultSimulationConfig> model, final JPanel coloredPanel,
final JComboBox<Integer> comboBox) {
super(name, model, coloredPanel);
this.comboBox = comboBox;
}
@Override
protected void saveColor(Color color) {
model.config.setPedestrianColor(comboBox.getSelectedIndex() + 1, color);
}
@Override
protected void saveColor(Color color) {
Integer selectedTargetId = comboBox.getItemAt(comboBox.getSelectedIndex());
if (selectedTargetId != null) {
model.config.setPedestrianColor(selectedTargetId, color);
}
}
}
......@@ -34,17 +34,18 @@ public class DialogFactory {
}
public static JDialog createSettingsDialog(final SimulationModel<? extends DefaultSimulationConfig> model) {
//SwingUtilities.invokeLater()
if (settingsDialog == null || currentModel == null || !currentModel.equals(model)) {
currentModel = model;
if(model instanceof PostvisualizationModel) {
settingsDialog = new org.vadere.gui.postvisualization.view.SettingsDialog((PostvisualizationModel)model);
}
else {
settingsDialog = new SettingsDialog(model);
}
settingsDialog.initComponents();
currentModel = model;
// Instead of reusing an old "SettingsDialog", create a new one to avoid any problems.
if(model instanceof PostvisualizationModel) {
settingsDialog = new org.vadere.gui.postvisualization.view.SettingsDialog((PostvisualizationModel)model);
}
else {
settingsDialog = new SettingsDialog(model);
}
settingsDialog.initComponents();
return settingsDialog;
}
}
......@@ -58,7 +58,7 @@ public class SettingsDialog extends org.vadere.gui.components.view.SettingsDialo
additionalLayeredPane.add(chShowAllTrajOnSnapshot, cc.xy(2, 8));
JCheckBox chShowEvacTimeColor = new JCheckBox(Messages.getString("PostVis.chShowEvacTimeColor.text"));
getColorLayeredPane().add(chShowEvacTimeColor, cc.xyw(2, 26, 8));
getColorSettingsPane().add(chShowEvacTimeColor, cc.xyw(2, 26, 8));
chShowEvacTimeColor.addItemListener(e -> {
model.config.setUseEvacuationTimeColor(!model.config.isUseEvacuationTimeColor());
......@@ -66,7 +66,7 @@ public class SettingsDialog extends org.vadere.gui.components.view.SettingsDialo
});
PedestrianColorPanel pedestrianColorPanel = new PedestrianColorPanel(model.getPedestrianColorTableModel());
getColorLayeredPane().add(pedestrianColorPanel, cc.xyw(2, 22, 8));
getColorSettingsPane().add(pedestrianColorPanel, cc.xyw(2, 22, 8));
......
......@@ -260,7 +260,6 @@ public class VadereConfig {
defaultConfig.put("ProjectView.defaultDirectoryAttributes", defaultSearchDirectory);
defaultConfig.put("ProjectView.defaultDirectoryScenarios", defaultSearchDirectory);
defaultConfig.put("ProjectView.defaultDirectoryOutputProcessors", defaultSearchDirectory);
defaultConfig.put("SettingsDialog.maxNumberOfTargets", "10");
defaultConfig.put("SettingsDialog.dataFormat", "yyyy_MM_dd_HH_mm_ss");
defaultConfig.put("SettingsDialog.outputDirectory.path", ".");
defaultConfig.put("SettingsDialog.snapshotDirectory.path", ".");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment