Fix selected construction site border not being drawn #2
@@ -751,6 +751,20 @@ void GameWorldView::drawBuildings(QPainter& painter)
|
|||||||
painter.setBrush(Qt::NoBrush);
|
painter.setBrush(Qt::NoBrush);
|
||||||
painter.drawRect(bboxRect);
|
painter.drawRect(bboxRect);
|
||||||
|
|
||||||
|
bool selected = false;
|
||||||
|
for (BuildingId selId : m_selectedBuildingIds)
|
||||||
|
{
|
||||||
|
if (selId == s.id) { selected = true; break; }
|
||||||
|
}
|
||||||
|
if (selected)
|
||||||
|
{
|
||||||
|
painter.setOpacity(1.0);
|
||||||
|
painter.setPen(QPen(m_visuals->overlays.selectedOutline, 2));
|
||||||
|
painter.setBrush(Qt::NoBrush);
|
||||||
|
painter.drawRect(bboxRect.adjusted(-1, -1, 1, 1));
|
||||||
|
painter.setOpacity(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
const BuildingDef* siteDef = findBuildingDef(s.type);
|
const BuildingDef* siteDef = findBuildingDef(s.type);
|
||||||
if (siteDef)
|
if (siteDef)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user