mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-13 10:11:02 +00:00
Put the MainWindow in charge of handling 'global' type shortcuts
* QShortcut falls down on duplicates. It can have activatedAmbiguously events, but these happen in arbitrary order and the shortcuts on menu items just swallow the ambiguous activate so it's not useful. * Instead we just let MainWindow pick up ShortcutOverride events and consult a mapping of which shortcuts to use. We can use a smarter selection method to choose the more 'local' shortcut if two shortcuts that conflict exist.
This commit is contained in:
@@ -217,9 +217,8 @@ void ShaderViewer::editShader(bool customShader, const QString &entryPoint, cons
|
||||
m_FindState = FindState();
|
||||
});
|
||||
|
||||
// TODO - shortcuts
|
||||
QObject::connect(new QShortcut(QKeySequence(Qt::Key_S | Qt::ControlModifier), scintilla),
|
||||
&QShortcut::activated, this, &ShaderViewer::on_save_clicked);
|
||||
m_Ctx.GetMainWindow()->RegisterShortcut(QKeySequence(QKeySequence::Save).toString(), this,
|
||||
[this]() { on_save_clicked(); });
|
||||
|
||||
QWidget *w = (QWidget *)scintilla;
|
||||
w->setProperty("filename", f);
|
||||
|
||||
Reference in New Issue
Block a user