Skip to content

Commit

Permalink
Fixed boolean operators not enabled in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mtygesen committed Jan 28, 2024
1 parent 50cae6a commit 09a1d9b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public String toString() {
result.append(gcd ? " --gcd-lower " : ""); // GCD optimization is not sound for workflow analysis
}

result.append(" --bindings");
return result.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ public String toString() {
result.append(" --col-reduction 0 ");
}

result.append(" --bindings");
return result.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public String toString() {
result.append(' ');
result.append(discreteInclusion ? " --inclusion-check 1" : "");
result.append(discreteInclusion ? " --inclusion-places " + generateDiscretePlacesList() : "");
result.append(" --bindings");
return result.toString();
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/tapaal/gui/petrinet/dialog/QueryDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,13 @@ private void updateQueryButtonsAccordingToSelection() {
}

if ((lens.isGame() || lens.isTimed() || queryType.getSelectedIndex() != 0) &&
current instanceof TCTLAbstractPathProperty || newProperty instanceof TCTLPathPlaceHolder) {
(current instanceof TCTLAbstractPathProperty || newProperty instanceof TCTLPathPlaceHolder)) {

boolean enableBooleanOperators = !(current instanceof LTLANode || current instanceof LTLENode) && queryType.getSelectedIndex() != 0;

disjunctionButton.setEnabled(enableBooleanOperators);
conjunctionButton.setEnabled(enableBooleanOperators);
negationButton.setEnabled(enableBooleanOperators || !lens.isGame() && lens.isTimed());
negationButton.setEnabled(enableBooleanOperators);
}
}

Expand Down

0 comments on commit 09a1d9b

Please sign in to comment.