2.12.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
......@@ -20,6 +20,10 @@ public class ActionSetPedestrianColor extends ActionSetColor {
@Override
protected void saveColor(Color color) {
model.config.setPedestrianColor(comboBox.getSelectedIndex() + 1, 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;
// 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