mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 06:36:08 +00:00
Add a ctrl+enter shortcut in capture dialog to launch the capture
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include "CaptureDialog.h"
|
||||
#include <QKeyEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
@@ -207,6 +208,10 @@ CaptureDialog::CaptureDialog(ICaptureContext &ctx, OnCaptureMethod captureCallba
|
||||
initWarning(ui->androidWarn);
|
||||
QObject::connect(ui->androidWarn, &RDLabel::clicked, this, &CaptureDialog::androidWarn_mouseClick);
|
||||
|
||||
QObject::connect(ui->exePath, &RDLineEdit::keyPress, this, &CaptureDialog::lineEdit_keyPress);
|
||||
QObject::connect(ui->workDirPath, &RDLineEdit::keyPress, this, &CaptureDialog::lineEdit_keyPress);
|
||||
QObject::connect(ui->cmdline, &RDLineEdit::keyPress, this, &CaptureDialog::lineEdit_keyPress);
|
||||
|
||||
m_AndroidFlags = AndroidFlags::NoFlags;
|
||||
|
||||
m_CaptureCallback = captureCallback;
|
||||
@@ -684,6 +689,15 @@ Would you like RenderDoc to try patching your package?
|
||||
}
|
||||
}
|
||||
|
||||
void CaptureDialog::lineEdit_keyPress(QKeyEvent *ev)
|
||||
{
|
||||
if((ev->key() == Qt::Key_Return || ev->key() == Qt::Key_Enter) &&
|
||||
ev->modifiers() & Qt::ControlModifier)
|
||||
{
|
||||
TriggerCapture();
|
||||
}
|
||||
}
|
||||
|
||||
void CaptureDialog::on_processRefesh_clicked()
|
||||
{
|
||||
fillProcessList();
|
||||
|
||||
Reference in New Issue
Block a user