diff --git a/NEWS.md b/NEWS.md index 63fd58793a..940f5ca1fa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +### [Unreleased] + +* Removed Space and Ctrl+Space shortcuts from Layers view to avoid conflict with panning (#3672) + ### Tiled 1.10.1 (4 April 2023) * Make panning with Space require pressing a mouse button as well (#3626) diff --git a/src/tiled/layerdock.cpp b/src/tiled/layerdock.cpp index dab729761c..19d5a43b4f 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);