summaryrefslogtreecommitdiff
path: root/quacker/quacker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quacker/quacker.cpp')
-rw-r--r--quacker/quacker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/quacker/quacker.cpp b/quacker/quacker.cpp
index af50d2f..3502c3a 100644
--- a/quacker/quacker.cpp
+++ b/quacker/quacker.cpp
@@ -1293,7 +1293,10 @@ void TopLevel::loadFile(const QString &filename)
}
QTextStream stream(&file);
+ delete m_game;
m_game = logania->read(stream, QuackleIO::Logania::MaintainBoardPreparation);
+ delete m_macondo;
+ m_macondo = new Macondo(m_game);
file.close();
@@ -2001,9 +2004,7 @@ void TopLevel::createWidgets()
m_history = new History;
plugIntoHistoryMatrix(m_history);
- m_macondo = new Macondo(this);
- plugIntoMatrix(m_macondo);
- plugIntoPositionMatrix(m_macondo);
+ m_macondo = new Macondo(m_game);
m_tabWidget = new QTabWidget;
m_tabWidget->addTab(m_history, tr("Histor&y"));