BranchWatchDialog: Fix Misc. Errata

Window icon was missing from QDialog lacking a parent.
Giving the QDialog a parent revealed I had failed to make it properly non-modal, necessitating further changes.
Settings save less often, now only upon destruction.
Construction of BranchWatchDialog is now deferred.
This commit is contained in:
mitaclaw
2024-03-05 14:02:45 -08:00
parent 8f6fd912f7
commit 0645b4d579
4 changed files with 35 additions and 25 deletions

View File

@ -49,9 +49,11 @@ class BranchWatchDialog : public QDialog
public:
explicit BranchWatchDialog(Core::System& system, Core::BranchWatch& branch_watch,
CodeWidget* code_widget, QWidget* parent = nullptr);
void done(int r) override;
int exec() override;
void open() override;
~BranchWatchDialog() override;
protected:
void hideEvent(QHideEvent* event) override;
void showEvent(QShowEvent* event) override;
private:
void OnStartPause(bool checked);
@ -82,6 +84,8 @@ private:
void OnTableSetNOP(QModelIndexList index_list);
void OnTableCopyAddress(QModelIndexList index_list);
void SaveSettings();
public:
// TODO: Step doesn't cause EmulationStateChanged to be emitted, so it has to call this manually.
void Update();