Connect new plan lines to end of previous line when ctrl pressed

This commit is contained in:
Jonathan G Rennison
2021-11-16 00:03:04 +00:00
parent f53b295a58
commit 6a4d849cba
2 changed files with 7 additions and 0 deletions

View File

@@ -381,6 +381,10 @@ struct PlansWindow : Window {
const Point p = GetTileBelowCursor();
const TileIndex tile = TileVirtXY(p.x, p.y);
if (_current_plan && tile < MapSize()) {
if (_ctrl_pressed && _current_plan->temp_line->tiles.empty() && _current_plan->last_tile != INVALID_TILE) {
_current_plan->StoreTempTile(_current_plan->last_tile);
_current_plan->last_tile = INVALID_TILE;
}
_current_plan->StoreTempTile(tile);
_thd.selstart = _thd.selend;
}