aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/mainwindow.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-04-17 10:36:06 +0200
committerKarel Kočí <cynerd@email.cz>2018-04-17 10:36:06 +0200
commitfda5c2613695268e75c9be99617660ecec50baa7 (patch)
tree2890ff4aeb016adbdd02b6f89a130d75630d2fdf /qtmips_gui/mainwindow.cpp
parent731701ee554833c5e69c1eb77764cda425ca9308 (diff)
downloadqtmips-fda5c2613695268e75c9be99617660ecec50baa7.tar.gz
qtmips-fda5c2613695268e75c9be99617660ecec50baa7.tar.bz2
qtmips-fda5c2613695268e75c9be99617660ecec50baa7.zip
Store memory and program view address position
This reloads memoryview with same base address as it was closed with. It somewhat works but with program view it seems to be buggy and shifts stuff down. But let's say that it's good enough for now.
Diffstat (limited to 'qtmips_gui/mainwindow.cpp')
-rw-r--r--qtmips_gui/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp
index b3a134b..7a4a06c 100644
--- a/qtmips_gui/mainwindow.cpp
+++ b/qtmips_gui/mainwindow.cpp
@@ -16,9 +16,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
ndialog = new NewDialog(this, settings);
registers = new RegistersDock(this);
registers->hide();
- program = new ProgramDock(this);
+ program = new ProgramDock(this, settings);
program->hide();
- memory = new MemoryDock(this);
+ memory = new MemoryDock(this, settings);
memory->hide();
cache_program = new CacheDock(this, "Program");
cache_program->hide();
@@ -55,8 +55,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
}
MainWindow::~MainWindow() {
- settings->sync();
- delete settings;
if (corescene != nullptr)
delete corescene;
if (coreview != nullptr)
@@ -70,6 +68,8 @@ MainWindow::~MainWindow() {
delete ui;
if (machine != nullptr)
delete machine;
+ settings->sync();
+ delete settings;
}
void MainWindow::start() {