Add Undo/Redo actions.
--HG-- branch : feature
This commit is contained in:
parent
c25f6d5dd5
commit
36949b8f45
|
@ -36,6 +36,7 @@
|
||||||
#include "exception/vexceptionwrongid.h"
|
#include "exception/vexceptionwrongid.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "xml/vstandardmeasurements.h"
|
#include "xml/vstandardmeasurements.h"
|
||||||
|
#include "widgets/vapplication.h"
|
||||||
|
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
@ -1708,6 +1709,21 @@ void MainWindow::CreateMenus()
|
||||||
separatorAct->setSeparator(true);
|
separatorAct->setSeparator(true);
|
||||||
ui->menuFile->insertAction(ui->actionPreferences, separatorAct);
|
ui->menuFile->insertAction(ui->actionPreferences, separatorAct);
|
||||||
UpdateRecentFileActions();
|
UpdateRecentFileActions();
|
||||||
|
|
||||||
|
//Add Undo/Redo actions.
|
||||||
|
QAction *undoAction = qApp->getUndoStack()->createUndoAction(this, tr("&Undo"));
|
||||||
|
undoAction->setShortcuts(QKeySequence::Undo);
|
||||||
|
undoAction->setIcon(QIcon::fromTheme("edit-undo"));
|
||||||
|
ui->menuDrawing->insertAction(ui->actionPattern_properties, undoAction);
|
||||||
|
|
||||||
|
QAction *redoAction = qApp->getUndoStack()->createRedoAction(this, tr("&Redo"));
|
||||||
|
redoAction->setShortcuts(QKeySequence::Redo);
|
||||||
|
redoAction->setIcon(QIcon::fromTheme("edit-redo"));
|
||||||
|
ui->menuDrawing->insertAction(ui->actionPattern_properties, redoAction);
|
||||||
|
|
||||||
|
separatorAct = new QAction(this);
|
||||||
|
separatorAct->setSeparator(true);
|
||||||
|
ui->menuDrawing->insertAction(ui->actionPattern_properties, separatorAct);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
src/app/share/resources/icons/win.icon.theme/24x24/actions/edit-redo.png
Executable file
BIN
src/app/share/resources/icons/win.icon.theme/24x24/actions/edit-redo.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
src/app/share/resources/icons/win.icon.theme/24x24/actions/edit-undo.png
Executable file
BIN
src/app/share/resources/icons/win.icon.theme/24x24/actions/edit-undo.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
|
@ -34,5 +34,11 @@
|
||||||
<file alias="24x24/actions/list-add.png">icons/win.icon.theme/24x24/actions/list-add.png</file>
|
<file alias="24x24/actions/list-add.png">icons/win.icon.theme/24x24/actions/list-add.png</file>
|
||||||
<file alias="32x32/actions/list-remove.png">icons/win.icon.theme/32x32/actions/list-remove.png</file>
|
<file alias="32x32/actions/list-remove.png">icons/win.icon.theme/32x32/actions/list-remove.png</file>
|
||||||
<file alias="32x32/actions/list-add.png">icons/win.icon.theme/32x32/actions/list-add.png</file>
|
<file alias="32x32/actions/list-add.png">icons/win.icon.theme/32x32/actions/list-add.png</file>
|
||||||
|
<file>icons/win.icon.theme/16x16/actions/edit-redo.png</file>
|
||||||
|
<file>icons/win.icon.theme/16x16/actions/edit-undo.png</file>
|
||||||
|
<file>icons/win.icon.theme/24x24/actions/edit-undo.png</file>
|
||||||
|
<file>icons/win.icon.theme/24x24/actions/edit-redo.png</file>
|
||||||
|
<file>icons/win.icon.theme/32x32/actions/edit-redo.png</file>
|
||||||
|
<file>icons/win.icon.theme/32x32/actions/edit-undo.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user