From 1ce927e6be2780f9548e14509b8c327b19e8547d Mon Sep 17 00:00:00 2001 From: Lukáš Lalinský Date: Fri, 5 Dec 2008 16:43:38 +0100 Subject: Set the correct edit mode on Open/New --- databasemodel.cpp | 2 +- mainwindow.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/databasemodel.cpp b/databasemodel.cpp index 9e6f635..173a37c 100644 --- a/databasemodel.cpp +++ b/databasemodel.cpp @@ -24,7 +24,7 @@ #include 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()); -- cgit v1.2.3-70-g09d2