Skip to content

Commit c16839c

Browse files
authored
Merge pull request #234 from MilesWilde/master
layout error message
2 parents a2eb450 + 57b11dc commit c16839c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

optional/handlers/house/house.simba

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,11 @@ begin
14071407
imgbox := parent.GetChild('poh_builder');
14081408

14091409
matches := LayoutFinder.Run(topLeft, bottomRight);
1410+
if Length(matches) = 0 then
1411+
begin
1412+
MessageDlg('LayoutFinder', 'No matches found. Try adding more rooms (only works with smallest icons)', mtWarning, [mbOk]);
1413+
Exit;
1414+
end;
14101415

14111416
center := [House.Loader.AMOUNT div 2, House.Loader.AMOUNT div 2];
14121417
offset := [Abs(bottomRight.X - topLeft.X - center.X), Abs(bottomRight.Y - topLeft.Y - center.Y)];

0 commit comments

Comments
 (0)