summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databasemodel.cpp2
-rw-r--r--mainwindow.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/databasemodel.cpp b/databasemodel.cpp
index 9e6f635..173a37c 100644
--- a/databasemodel.cpp
+++ b/databasemodel.cpp
@@ -24,7 +24,7 @@
#include <QTextStream>
DatabaseModel::DatabaseModel(QObject *parent)
- : QGraphicsScene(parent), m_line(NULL)
+ : QGraphicsScene(parent), m_mode(DatabaseModel::Select), m_line(NULL)
{
m_undoStack = new QUndoStack(this);
connect(this, SIGNAL(tableMoved(DatabaseTable *)), SLOT(updatePositions(DatabaseTable *)));
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 805e64f..62983c8 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -261,6 +261,7 @@ MainWindow::newModel(DatabaseModel *newModel)
delete m_model;
}
m_model = newModel;
+ updateMode(m_model->mode());
m_undoGroup->addStack(m_model->undoStack());
m_undoGroup->setActiveStack(m_model->undoStack());