remove the Shift copy-building-settings gesture

This commit is contained in:
2026-08-06 19:09:11 +02:00
parent fd6a7c5815
commit cd31af2611
12 changed files with 26 additions and 231 deletions

View File

@@ -129,7 +129,6 @@ void WorldRenderer::render(QPainter& painter, const WorldCoordinates& coordinate
// into the port and stay visible while crossing directly between two touching
// buildings (REQ-MAT-OUTPUT-EMERGE, REQ-MAT-INPUT-INTAKE, REQ-MAT-DIRECT-COUPLE).
drawPortItems(painter, coordinates, frame);
drawCopyConfigFeedback(painter, coordinates, frame);
drawStations(painter, coordinates, frame);
drawBeltItems(painter, coordinates, frame);
drawDebris(painter, coordinates, frame);
@@ -505,44 +504,6 @@ void WorldRenderer::drawSelectionHighlights(QPainter& painter, const WorldCoordi
}
}
void WorldRenderer::drawCopyConfigFeedback(QPainter& painter, const WorldCoordinates& coordinates,
const WorldRenderFrame& frame)
{
const QColor color = m_visuals.overlays.copyConfig;
// Eligible-target tint: while a configuration is cached, every same-type
// building and site (the source included) is a valid paste target and is
// washed in the copy-settings color (REQ-BLD-COPY-CONFIG-FEEDBACK).
if (frame.copiedConfig.has_value())
{
painter.setPen(Qt::NoPen);
painter.setBrush(color);
const BuildingType type = frame.copiedConfig->type;
for (const Building& b : getAllBuildings(m_sim.getFactoryState()))
{
if (b.type != type) { continue; }
const std::optional<QRectF> rect = footprintWidgetRect(coordinates, b.id);
if (rect.has_value()) { painter.drawRect(*rect); }
}
for (const ConstructionSite& s : getAllSites(m_sim.getFactoryState()))
{
if (s.type != type) { continue; }
const std::optional<QRectF> rect = footprintWidgetRect(coordinates, s.id);
if (rect.has_value()) { painter.drawRect(*rect); }
}
}
// Copy / paste flashes: a brief outline in the same color, drawn like the
// selection outline (REQ-BLD-COPY-CONFIG-FEEDBACK).
painter.setPen(QPen(color, 2));
painter.setBrush(Qt::NoBrush);
for (const CopyConfigFlash& flash : frame.copyConfigFlashes)
{
const std::optional<QRectF> rect = footprintWidgetRect(coordinates, flash.id);
if (rect.has_value()) { painter.drawRect(rect->adjusted(-1, -1, 1, 1)); }
}
}
void WorldRenderer::drawPortItems(QPainter& painter, const WorldCoordinates& coordinates,
const WorldRenderFrame& /*frame*/)
{