mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 17:05:37 +00:00
CStringEditor: Fix capture of keyboard shortcuts in CStringEditor
Previously, these keyboard shortcuts didn't work.
This commit is contained in:
@@ -98,14 +98,14 @@ void CStringEditor::InitUI()
|
|||||||
mpListModel = new CStringListModel(this);
|
mpListModel = new CStringListModel(this);
|
||||||
mpUI->StringNameListView->setModel(mpListModel);
|
mpUI->StringNameListView->setModel(mpListModel);
|
||||||
mpUI->StringNameListView->setItemDelegate(new CStringDelegate(this));
|
mpUI->StringNameListView->setItemDelegate(new CStringDelegate(this));
|
||||||
mpUI->AddStringButton->setShortcut(QKeySequence(Qt::Key_Alt, Qt::Key_Equal));
|
mpUI->AddStringButton->setShortcut(QKeySequence(Qt::ALT | Qt::Key_Equal));
|
||||||
mpUI->RemoveStringButton->setShortcut(QKeySequence(Qt::Key_Alt, Qt::Key_Minus));
|
mpUI->RemoveStringButton->setShortcut(QKeySequence(Qt::ALT | Qt::Key_Minus));
|
||||||
|
|
||||||
// Register shortcuts
|
// Register shortcuts
|
||||||
new QShortcut(QKeySequence(Qt::Key_Alt, Qt::Key_Down), this, [this] { IncrementStringIndex(); });
|
new QShortcut(QKeySequence(Qt::ALT | Qt::Key_Down), this, this, &CStringEditor::IncrementStringIndex);
|
||||||
new QShortcut(QKeySequence(Qt::Key_Alt, Qt::Key_Up), this, [this] { DecrementStringIndex(); });
|
new QShortcut(QKeySequence(Qt::ALT | Qt::Key_Up), this, this, &CStringEditor::DecrementStringIndex);
|
||||||
new QShortcut(QKeySequence(Qt::Key_Alt, Qt::Key_Right), this, [this] { IncrementLanguageIndex(); });
|
new QShortcut(QKeySequence(Qt::ALT | Qt::Key_Right), this, this, &CStringEditor::IncrementLanguageIndex);
|
||||||
new QShortcut(QKeySequence(Qt::Key_Alt, Qt::Key_Left), this, [this] { DecrementLanguageIndex(); });
|
new QShortcut(QKeySequence(Qt::ALT | Qt::Key_Left), this, this, &CStringEditor::DecrementLanguageIndex);
|
||||||
|
|
||||||
// Set up language tabs
|
// Set up language tabs
|
||||||
mpUI->EditLanguageTabBar->setExpanding(false);
|
mpUI->EditLanguageTabBar->setExpanding(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user