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

@@ -88,7 +88,6 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) : QGraphicsView(pare
connect(&(scene -> border_and_titleblock), SIGNAL(borderChanged(QRectF, QRectF)), this, SLOT(adjustSceneRect()));
connect(&(scene -> border_and_titleblock), SIGNAL(displayChanged()), this, SLOT(adjustSceneRect()));
connect(&(scene -> border_and_titleblock), SIGNAL(diagramTitleChanged(const QString &)), this, SLOT(updateWindowTitle()));
connect(&(scene -> undoStack()), SIGNAL(cleanChanged(bool)), this, SLOT(updateWindowTitle()));
connect(diagram, SIGNAL(editElementRequired(ElementsLocation)), this, SIGNAL(editElementRequired(ElementsLocation)));
connect(diagram, SIGNAL(findElementRequired(ElementsLocation)), this, SIGNAL(findElementRequired(ElementsLocation)));
@@ -772,19 +771,7 @@ void DiagramView::adjustSceneRect() {
Met a jour le titre du widget
*/
void DiagramView::updateWindowTitle() {
QString view_title(title());
// verifie si le document a ete modifie
bool modified_diagram = !(scene -> undoStack().isClean());
// specifie le titre du widget
setWindowTitle(view_title + " [*]");
setWindowModified(modified_diagram);
// emet le signal titleChanged en ajoutant manuellement [*] si le schema a ete modifie
QString emitted_title = view_title;
if (modified_diagram) emitted_title += " [*]";
emit(titleChanged(this, emitted_title));
emit(titleChanged(this, title()));
}
/**