diff --git a/src/editor.cpp b/src/editor.cpp index bab20ee8..f58040df 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -1011,11 +1011,19 @@ void Editor::onMapEndPaint(QGraphicsSceneMouseEvent *, MapPixmapItem *item) { void Editor::setSmartPathCursorMode(QGraphicsSceneMouseEvent *event) { - bool smartPathsEnabled = event->modifiers() & Qt::ShiftModifier; - if (smartPathsEnabled || settings->smartPathsEnabled) { - this->cursorMapTileRect->setSmartPathMode(); + bool shiftPressed = event->modifiers() & Qt::ShiftModifier; + if (settings->smartPathsEnabled) { + if (!shiftPressed) { + this->cursorMapTileRect->setSmartPathMode(); + } else { + this->cursorMapTileRect->setNormalPathMode(); + } } else { - this->cursorMapTileRect->setNormalPathMode(); + if (shiftPressed) { + this->cursorMapTileRect->setSmartPathMode(); + } else { + this->cursorMapTileRect->setNormalPathMode(); + } } } diff --git a/src/ui/mappixmapitem.cpp b/src/ui/mappixmapitem.cpp index 7ab81e0d..4f077adc 100644 --- a/src/ui/mappixmapitem.cpp +++ b/src/ui/mappixmapitem.cpp @@ -15,12 +15,20 @@ void MapPixmapItem::paint(QGraphicsSceneMouseEvent *event) { int y = static_cast(pos.y()) / 16; // Paint onto the map. - bool smartPathsEnabled = event->modifiers() & Qt::ShiftModifier; + bool shiftPressed = event->modifiers() & Qt::ShiftModifier; QPoint selectionDimensions = this->metatileSelector->getSelectionDimensions(); - if ((this->settings->smartPathsEnabled || smartPathsEnabled) && selectionDimensions.x() == 3 && selectionDimensions.y() == 3) { - paintSmartPath(x, y); + if (settings->smartPathsEnabled) { + if (!shiftPressed && selectionDimensions.x() == 3 && selectionDimensions.y() == 3) { + paintSmartPath(x, y); + } else { + paintNormal(x, y); + } } else { - paintNormal(x, y); + if (shiftPressed && selectionDimensions.x() == 3 && selectionDimensions.y() == 3) { + paintSmartPath(x, y); + } else { + paintNormal(x, y); + } } } }