Fix "Remove" shortcut (Del) to work for both scenes and sources

This commit is contained in:
Palana 2014-10-15 22:03:22 +02:00
parent 523baef7f5
commit 55d2af0e60
2 changed files with 17 additions and 4 deletions

View File

@ -46,6 +46,10 @@
<height>32</height> <height>32</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<addaction name="actionRemoveSource"/>
</widget> </widget>
</item> </item>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter"> <item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
@ -165,6 +169,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<addaction name="actionRemoveScene"/>
</widget> </widget>
</item> </item>
<item> <item>
@ -270,6 +275,7 @@
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<addaction name="actionRemoveSource"/>
</widget> </widget>
</item> </item>
<item> <item>
@ -547,6 +553,12 @@
<property name="text"> <property name="text">
<string>Remove</string> <string>Remove</string>
</property> </property>
<property name="shortcut">
<string>Del</string>
</property>
<property name="shortcutContext">
<enum>Qt::WidgetWithChildrenShortcut</enum>
</property>
</action> </action>
<action name="actionRemoveSource"> <action name="actionRemoveSource">
<property name="icon"> <property name="icon">
@ -559,6 +571,9 @@
<property name="shortcut"> <property name="shortcut">
<string>Del</string> <string>Del</string>
</property> </property>
<property name="shortcutContext">
<enum>Qt::WidgetWithChildrenShortcut</enum>
</property>
</action> </action>
<action name="actionSceneProperties"> <action name="actionSceneProperties">
<property name="enabled"> <property name="enabled">

View File

@ -119,10 +119,8 @@ OBSBasic::OBSBasic(QWidget *parent)
QKeySequence::keyBindings(QKeySequence::Delete); QKeySequence::keyBindings(QKeySequence::Delete);
#ifdef __APPLE__ #ifdef __APPLE__
QList<QKeySequence> keys; ui->actionRemoveSource->setShortcuts(DeleteKeys);
keys.append(QKeySequence::Delete); ui->actionRemoveScene->setShortcuts(DeleteKeys);
keys.append(QKeySequence(Qt::Key_Backspace));
ui->actionRemoveSource->setShortcuts(keys);
ui->action_Settings->setMenuRole(QAction::PreferencesRole); ui->action_Settings->setMenuRole(QAction::PreferencesRole);
ui->actionE_xit->setMenuRole(QAction::QuitRole); ui->actionE_xit->setMenuRole(QAction::QuitRole);