Browse Source

GUI bug fix (simulator). How did this ever work?

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3459 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
f274604e0b
  1. 7
      prism/src/userinterface/simulator/GUISimulator.java
  2. 4
      prism/src/userinterface/simulator/GUIViewDialog.java

7
prism/src/userinterface/simulator/GUISimulator.java

@ -50,7 +50,6 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect
private static final long serialVersionUID = 1L;
//ATTRIBUTES
private GUIPrism gui; //reference to the gui
private GUIMultiProperties guiProp; //reference to the properties information
private GUIMultiModel guiMultiModel; //reference to the model plugin
private SimulatorEngine engine;
@ -316,7 +315,7 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect
// (just get contants needed for properties file labels)
UndefinedConstants uCon = new UndefinedConstants(parsedModel, pf, true);
if (uCon.getMFNumUndefined() + uCon.getPFNumUndefined() > 0) {
int result = GUIConstantsPicker.defineConstantsWithDialog(gui, uCon, lastConstants, lastPropertyConstants);
int result = GUIConstantsPicker.defineConstantsWithDialog(getGUI(), uCon, lastConstants, lastPropertyConstants);
if (result != GUIConstantsPicker.VALUES_DONE)
return;
}
@ -405,7 +404,7 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect
lastInitialState = initialState;
if (getPrism().getSettings().getBoolean(PrismSettings.SIMULATOR_NEW_PATH_ASK_VIEW)) {
new GUIViewDialog(gui, pathTableModel.getView(), pathTableModel);
new GUIViewDialog(getGUI(), pathTableModel.getView(), pathTableModel);
}
} catch (PrismException e) {
@ -618,7 +617,7 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect
public void a_configureView()
{
new GUIViewDialog(gui, pathTableModel.getView(), pathTableModel);
new GUIViewDialog(getGUI(), pathTableModel.getView(), pathTableModel);
}
/**

4
prism/src/userinterface/simulator/GUIViewDialog.java

@ -128,7 +128,7 @@ public class GUIViewDialog extends JDialog implements KeyListener
setResizable(true);
setLocationRelativeTo(getParent()); // centre
this.askOption = ((GUIPrism) this.getParent()).getPrism().getSettings().getBoolean(PrismSettings.SIMULATOR_NEW_PATH_ASK_VIEW);
this.askOption = gui.getPrism().getSettings().getBoolean(PrismSettings.SIMULATOR_NEW_PATH_ASK_VIEW);
optionCheckBox.setSelected(this.askOption);
showTimeCheckBox.setSelected(view.showTime());
@ -682,7 +682,7 @@ public class GUIViewDialog extends JDialog implements KeyListener
this.askOption = !this.askOption;
try {
((GUIPrism) this.getParent()).getPrism().getSettings().set(PrismSettings.SIMULATOR_NEW_PATH_ASK_VIEW, this.askOption);
gui.getPrism().getSettings().set(PrismSettings.SIMULATOR_NEW_PATH_ASK_VIEW, this.askOption);
} catch (PrismException e) {
}
}

Loading…
Cancel
Save