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

@@ -25,6 +25,7 @@
#include "exportproperties.h"
#include "qgimanager.h"
#include "numerotationcontext.h"
#include "qetproject.h"
class Conductor;
class CustomElement;
@@ -86,7 +87,6 @@ class Diagram : public QGraphicsScene {
bool draw_grid_;
bool use_border_;
QGIManager *qgi_manager_;
QUndoStack *undo_stack_;
bool draw_terminals_;
bool draw_colored_conductors_;
QDomDocument xml_document_;
@@ -323,7 +323,7 @@ inline Diagram::BorderOptions Diagram::borderOptions() {
/// @return the diagram undo stack
inline QUndoStack &Diagram::undoStack() {
return(*undo_stack_);
return *(project()->undoStack());
}
/// @return the diagram graphics item manager