Skip to content

Commit 05fe640

Browse files
authored
introduce shortcut ctrl+s which trigers on_actionSave_triggered() (#140)
1 parent a40e25c commit 05fe640

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bt_editor/mainwindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ MainWindow::MainWindow(GraphicMode initial_mode, QWidget *parent) :
126126
QShortcut* redo_shortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Z), this);
127127
connect( redo_shortcut, &QShortcut::activated, this, &MainWindow::onRedoInvoked );
128128

129+
QShortcut* save_shortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_S), this);
130+
129131
connect( _editor_widget, &SidepanelEditor::nodeModelEdited,
130132
this, &MainWindow::onTreeNodeEdited);
131133

@@ -176,6 +178,8 @@ MainWindow::MainWindow(GraphicMode initial_mode, QWidget *parent) :
176178
connect( ui->toolButtonSaveFile, &QToolButton::clicked,
177179
this, &MainWindow::on_actionSave_triggered );
178180

181+
connect( save_shortcut, &QShortcut::activated, this, &MainWindow::on_actionSave_triggered );
182+
179183
connect( _replay_widget, &SidepanelReplay::changeNodeStyle,
180184
this, &MainWindow::onChangeNodesStatus);
181185

0 commit comments

Comments
 (0)