Skip to content
Snippets Groups Projects
Commit 0df67992 authored by Kai Koehne's avatar Kai Koehne
Browse files

Let backspace delete current selection only on Mac OS X

Since a lot of Mac keyboards don't have a delete button we enabled
also backspace to delete the current item a while ago. However,
this can be confusing e.g. when editing an item in the property editor,
and you're accidentally loosing focus.

Reviewed-by: Thomas Hartmann
parent be3c59e9
No related branches found
No related tags found
No related merge requests found
...@@ -223,6 +223,7 @@ void BauhausPlugin::createDesignModeWidget() ...@@ -223,6 +223,7 @@ void BauhausPlugin::createDesignModeWidget()
command->setDefaultKeySequence(QKeySequence::SelectAll); command->setDefaultKeySequence(QKeySequence::SelectAll);
editMenu->addAction(command, Core::Constants::G_EDIT_SELECTALL); editMenu->addAction(command, Core::Constants::G_EDIT_SELECTALL);
#ifdef Q_OS_MACX
// add second shortcut to trigger delete // add second shortcut to trigger delete
QAction *deleteAction = new QAction(m_mainWidget); QAction *deleteAction = new QAction(m_mainWidget);
deleteAction->setShortcut(QKeySequence(QLatin1String("Backspace"))); deleteAction->setShortcut(QKeySequence(QLatin1String("Backspace")));
...@@ -230,6 +231,7 @@ void BauhausPlugin::createDesignModeWidget() ...@@ -230,6 +231,7 @@ void BauhausPlugin::createDesignModeWidget()
SIGNAL(triggered())); SIGNAL(triggered()));
m_mainWidget->addAction(deleteAction); m_mainWidget->addAction(deleteAction);
#endif // Q_OS_MACX
connect(m_editorManager, SIGNAL(currentEditorChanged(Core::IEditor*)), connect(m_editorManager, SIGNAL(currentEditorChanged(Core::IEditor*)),
this, SLOT(updateEditor(Core::IEditor*))); this, SLOT(updateEditor(Core::IEditor*)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment