Commit eb319d08 authored by Sarah Grebing's avatar Sarah Grebing

minor change for buttons

parent 0de0b416
Pipeline #16883 failed with stages
in 51 seconds
......@@ -939,7 +939,23 @@ public class DebuggerMain implements Initializable {
public void stopDebugMode(ActionEvent actionEvent) {
scriptController.getDebugPositionHighlighter().remove();
Button stop = (Button) actionEvent.getSource();
stop.setText("Reload");
javafx.scene.Node graphic = stop.getGraphic();
if (graphic instanceof MaterialDesignIconView) {
MaterialDesignIconView buttonLabel = (MaterialDesignIconView) graphic;
if (buttonLabel.getGlyphName().equals("STOP")) {
stop.setGraphic(new MaterialDesignIconView(MaterialDesignIcon.RELOAD, "24.0"));
stop.setTooltip(new Tooltip("Reload Problem"));
} else {
if (buttonLabel.getGlyphName().equals("RELOAD")) {
stop.setGraphic(new MaterialDesignIconView(MaterialDesignIcon.STOP, "24.0"));
stop.setTooltip(new Tooltip("Stop Debugging"));
reloadProblem(actionEvent);
}
}
} else {
throw new RuntimeException("Something went wrong when reading stop button");
}
}
/* public void handle(Events.TacletApplicationEvent tap){
......@@ -1122,12 +1138,6 @@ public class DebuggerMain implements Initializable {
ptree.addNodeColor(pnode, "blueviolet");
ptree.setDeactivateRefresh(true);
//TODO Traversierung WICHTIG
//traverse tree to closed goals -> set Sentinels
//laeves of PNode wenn aftestmt leer
//sonst nodes nodes afterstmt
if (stateAfterStmt.size() > 0) {
Set<Node> sentinels = proof.getSubtreeGoals(pnode)
.stream()
......@@ -1150,8 +1160,6 @@ public class DebuggerMain implements Initializable {
ptree.expandRootToSentinels();
//TODO set coloring of starting and end node
DockNode node = new DockNode(ptree, "Proof Tree for Step Into: " +
original.getStatement().accept(new ShortCommandPrinter())
);
......
......@@ -134,7 +134,7 @@
<MenuItem onAction="#stopDebugMode"
accelerator="F12"
text="Stop"
text="Stop Debugging"
disable="${controller.stepNotPossible}">
<!--disable="${! controller.debugMode}"-->
<graphic>
......@@ -229,14 +229,14 @@
</SplitMenuButton>
<Button onAction="#reloadProblem" disable="${controller.executeNotPossible}">
<graphic>
<MaterialDesignIconView glyphName="REFRESH" size="24.0"/>
</graphic>
<tooltip>
<Tooltip text="Reload Problem"/>
</tooltip>
</Button>
<!-- <Button onAction="#reloadProblem" disable="${controller.executeNotPossible}">
<graphic>
<MaterialDesignIconView glyphName="REFRESH" size="24.0"/>
</graphic>
<tooltip>
<Tooltip text="Reload Problem"/>
</tooltip>
</Button>-->
<Button onAction="#continueAfterRun" disable="${controller.executeNotPossible}">
<graphic>
......@@ -291,7 +291,7 @@
<MaterialDesignIconView glyphName="STOP" size="24.0"/>
</graphic>
<tooltip>
<Tooltip text="Stop"/>
<Tooltip text="Stop Debugging"/>
</tooltip>
</Button>
......
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