Убраны лишние нелогичные проверки позиции и размеров объекта в классе DrawingBoat
This commit is contained in:
parent
835c2ed576
commit
7628be7673
@ -62,11 +62,11 @@ namespace PIbd_21_Potapov_N.S._Catamaran_Base
|
|||||||
public void SetPosition(int x, int y, int width, int height)
|
public void SetPosition(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
// Проверки, что новая позиция и размеры объекта валидны
|
// Проверки, что новая позиция и размеры объекта валидны
|
||||||
if (width < 0 || height < 0 || width > _pictureWidth || height > _pictureHeight)
|
if (width < 0 || height < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (x < 0 || y < 0 || x >= _pictureWidth - width || y >= _pictureHeight - height)
|
if (x < 0 || y < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user