Skip to content

Commit

Permalink
GUI: disable trace constraints button in replay mode as stop gap till…
Browse files Browse the repository at this point in the history
… they can be handled properly (see #398)
  • Loading branch information
jim-carciofini committed Aug 13, 2024
1 parent 0fa6e6d commit f96fe00
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pate_binja/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ def setTrace(self, trace: dict, label: str = None):
class PateCfarEqCondDialog(QDialog):
def __init__(self, cfarNode, parent=None):
super().__init__(parent)
pw: Optional[PateWidget] = getAncestorInstanceOf(self, PateWidget)

self.cfarNode = cfarNode
self.traceConstraints = None
Expand All @@ -478,7 +479,13 @@ def __init__(self, cfarNode, parent=None):
eqCondBox.setLayout(eqCondBoxLayout)

# Constrain True Trace Button
trueTraceConstraintButton = QPushButton("Constrain Trace")
if pw.pate_thread.pate_wrapper.trace_file is None:
# Replay mode
trueTraceConstraintButton = QPushButton("Constrain Trace (disabled in replay mode)")
trueTraceConstraintButton.setEnabled(False)
else:
# Live Mode
trueTraceConstraintButton = QPushButton("Constrain Trace")
trueTraceConstraintButton.clicked.connect(lambda _: self.showTrueTraceConstraintDialog())

# True Trace Box
Expand Down

0 comments on commit f96fe00

Please sign in to comment.