remove undo stack by diagram, and add single undo stack for project

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2706 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-01-05 15:00:46 +00:00
parent c7660de89a
commit 1a83a7f2aa
8 changed files with 63 additions and 81 deletions

View File

@@ -62,6 +62,9 @@ QETProject::QETProject(int diagrams, QObject *parent) :
// une categorie dediee aux elements integres automatiquement
ensureIntegrationCategoryExists();
setupTitleBlockTemplatesCollection();
undo_stack_ = new QUndoStack();
connect(undo_stack_, SIGNAL(cleanChanged(bool)), this, SLOT(undoStackChanged(bool)));
}
/**
@@ -102,6 +105,9 @@ QETProject::QETProject(const QString &path, QObject *parent) :
if (!project_file_info.isWritable()) {
setReadOnly(true);
}
undo_stack_ = new QUndoStack();
connect(undo_stack_, SIGNAL(cleanChanged(bool)), this, SLOT(undoStackChanged(bool)));
}
/**
@@ -123,6 +129,9 @@ QETProject::QETProject(const QDomElement &xml_element, QObject *parent) :
readProjectXml();
setupTitleBlockTemplatesCollection();
undo_stack_ = new QUndoStack();
connect(undo_stack_, SIGNAL(cleanChanged(bool)), this, SLOT(undoStackChanged(bool)));
}
/**
@@ -145,6 +154,7 @@ QETProject::~QETProject() {
delete diagram;
}
// qDebug() << diagrams_;
delete undo_stack_;
}
/**