diff --git a/src/tiled/layerdock.cpp b/src/tiled/layerdock.cpp index dab729761c8..19d5a43b4f0 100644 --- a/src/tiled/layerdock.cpp +++ b/src/tiled/layerdock.cpp @@ -24,7 +24,6 @@ #include "layerdock.h" #include "actionmanager.h" -#include "changelayer.h" #include "layer.h" #include "layermodel.h" #include "map.h" @@ -478,8 +477,6 @@ void LayerView::contextMenuEvent(QContextMenuEvent *event) void LayerView::keyPressEvent(QKeyEvent *event) { - Layer *layer = mMapDocument ? mMapDocument->currentLayer() : nullptr; - switch (event->key()) { case Qt::Key_Delete: case Qt::Key_Backspace: @@ -488,17 +485,6 @@ void LayerView::keyPressEvent(QKeyEvent *event) return; } break; - case Qt::Key_Space: - if (layer) { - QUndoCommand *command = nullptr; - if (event->modifiers() & Qt::ControlModifier) - command = new SetLayerLocked(mMapDocument, { layer }, !layer->isLocked()); - else - command = new SetLayerVisible(mMapDocument, { layer }, !layer->isVisible()); - mMapDocument->undoStack()->push(command); - return; - } - break; } QTreeView::keyPressEvent(event);