Call the property browser to update state each time a user call undo/redo
command. --HG-- branch : feature
This commit is contained in:
parent
fd39c19da0
commit
efb852a63e
|
@ -130,17 +130,8 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateActions();
|
CreateActions();
|
||||||
CreateMenus();
|
|
||||||
ToolBarDraws();
|
|
||||||
ToolBarStages();
|
|
||||||
InitToolButtons();
|
|
||||||
InitScenes();
|
InitScenes();
|
||||||
|
|
||||||
helpLabel = new QLabel(QObject::tr("Create new pattern piece to start working."));
|
|
||||||
ui->statusBar->addWidget(helpLabel);
|
|
||||||
|
|
||||||
ToolBarTools();
|
|
||||||
|
|
||||||
doc = new VPattern(pattern, &mode, sceneDraw, sceneDetails);
|
doc = new VPattern(pattern, &mode, sceneDraw, sceneDetails);
|
||||||
connect(doc, &VPattern::ClearMainWindow, this, &MainWindow::Clear);
|
connect(doc, &VPattern::ClearMainWindow, this, &MainWindow::Clear);
|
||||||
connect(doc, &VPattern::patternChanged, this, &MainWindow::PatternWasModified);
|
connect(doc, &VPattern::patternChanged, this, &MainWindow::PatternWasModified);
|
||||||
|
@ -150,6 +141,17 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP);
|
connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP);
|
||||||
qApp->setCurrentDocument(doc);
|
qApp->setCurrentDocument(doc);
|
||||||
|
|
||||||
|
InitDocksContain();
|
||||||
|
CreateMenus();
|
||||||
|
ToolBarDraws();
|
||||||
|
ToolBarStages();
|
||||||
|
InitToolButtons();
|
||||||
|
|
||||||
|
helpLabel = new QLabel(QObject::tr("Create new pattern piece to start working."));
|
||||||
|
ui->statusBar->addWidget(helpLabel);
|
||||||
|
|
||||||
|
ToolBarTools();
|
||||||
|
|
||||||
connect(qApp->getUndoStack(), &QUndoStack::cleanChanged, this, &MainWindow::PatternWasModified);
|
connect(qApp->getUndoStack(), &QUndoStack::cleanChanged, this, &MainWindow::PatternWasModified);
|
||||||
|
|
||||||
InitAutoSave();
|
InitAutoSave();
|
||||||
|
@ -157,7 +159,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
ui->toolBox->setCurrentIndex(0);
|
ui->toolBox->setCurrentIndex(0);
|
||||||
|
|
||||||
ReadSettings();
|
ReadSettings();
|
||||||
InitDocksContain();
|
|
||||||
|
|
||||||
setCurrentFile("");
|
setCurrentFile("");
|
||||||
WindowsLocale();
|
WindowsLocale();
|
||||||
|
@ -3371,12 +3372,14 @@ void MainWindow::CreateMenus()
|
||||||
|
|
||||||
//Add Undo/Redo actions.
|
//Add Undo/Redo actions.
|
||||||
undoAction = qApp->getUndoStack()->createUndoAction(this, tr("&Undo"));
|
undoAction = qApp->getUndoStack()->createUndoAction(this, tr("&Undo"));
|
||||||
|
connect(undoAction, &QAction::triggered, toolOptions, &VToolOptionsPropertyBrowser::RefreshOptions);
|
||||||
undoAction->setShortcuts(QKeySequence::Undo);
|
undoAction->setShortcuts(QKeySequence::Undo);
|
||||||
undoAction->setIcon(QIcon::fromTheme("edit-undo"));
|
undoAction->setIcon(QIcon::fromTheme("edit-undo"));
|
||||||
ui->menuPatternPiece->insertAction(ui->actionLast_tool, undoAction);
|
ui->menuPatternPiece->insertAction(ui->actionLast_tool, undoAction);
|
||||||
ui->toolBarTools->addAction(undoAction);
|
ui->toolBarTools->addAction(undoAction);
|
||||||
|
|
||||||
redoAction = qApp->getUndoStack()->createRedoAction(this, tr("&Redo"));
|
redoAction = qApp->getUndoStack()->createRedoAction(this, tr("&Redo"));
|
||||||
|
connect(redoAction, &QAction::triggered, toolOptions, &VToolOptionsPropertyBrowser::RefreshOptions);
|
||||||
redoAction->setShortcuts(QKeySequence::Redo);
|
redoAction->setShortcuts(QKeySequence::Redo);
|
||||||
redoAction->setIcon(QIcon::fromTheme("edit-redo"));
|
redoAction->setIcon(QIcon::fromTheme("edit-redo"));
|
||||||
ui->menuPatternPiece->insertAction(ui->actionLast_tool, redoAction);
|
ui->menuPatternPiece->insertAction(ui->actionLast_tool, redoAction);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user