1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

undo the width/height "fix"

This commit is contained in:
Ellpeck 2020-03-18 03:38:30 +01:00
parent cd70b22ae5
commit 739d337d49

View file

@ -231,22 +231,21 @@ namespace MLEM.Ui {
RectangleF searchArea = default;
if (this.SelectedElement?.Root != null) {
searchArea = this.SelectedElement.Area;
var view = this.System.Viewport;
view.Inflate(view.Width, view.Height);
var (_, _, width, height) = this.System.Viewport;
switch (dir) {
case Direction2.Down:
searchArea.Height += view.Height;
searchArea.Height += height;
break;
case Direction2.Left:
searchArea.X -= view.Width;
searchArea.Width += view.Width;
searchArea.X -= width;
searchArea.Width += width;
break;
case Direction2.Right:
searchArea.Width += view.Width;
searchArea.Width += width;
break;
case Direction2.Up:
searchArea.Y -= view.Height;
searchArea.Height += view.Height;
searchArea.Y -= height;
searchArea.Height += height;
break;
}
}