diff --git a/pate_binja/view.py b/pate_binja/view.py index 932f1e63..c45d2483 100644 --- a/pate_binja/view.py +++ b/pate_binja/view.py @@ -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 @@ -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