summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2008-12-05 16:43:38 +0100
committerLukáš Lalinský <lalinsky@gmail.com>2008-12-05 16:43:38 +0100
commit1ce927e6be2780f9548e14509b8c327b19e8547d (patch)
tree5599f57be87c9a39e73ccea94a749e35014192cf
parent0a33eeb4e9f041187619218c485b91034650ee0f (diff)
downloaddbmodel-1ce927e6be2780f9548e14509b8c327b19e8547d.tar.xz
Set the correct edit mode on Open/New
-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());