Fix WIND tool not reacting to zoom window properly, fixes #899
This commit is contained in:
parent
8ce7a37070
commit
e824e023f1
@ -371,6 +371,11 @@ ui::Point GameController::PointTranslate(ui::Point point)
|
||||
return gameModel->AdjustZoomCoords(point);
|
||||
}
|
||||
|
||||
ui::Point GameController::PointTranslateNoClamp(ui::Point point)
|
||||
{
|
||||
return gameModel->AdjustZoomCoords(point);
|
||||
}
|
||||
|
||||
ui::Point GameController::NormaliseBlockCoord(ui::Point point)
|
||||
{
|
||||
return (point/CELL)*CELL;
|
||||
|
@ -164,6 +164,7 @@ public:
|
||||
void TransformSave(matrix2d transform);
|
||||
bool MouseInZoom(ui::Point position);
|
||||
ui::Point PointTranslate(ui::Point point);
|
||||
ui::Point PointTranslateNoClamp(ui::Point point);
|
||||
ui::Point NormaliseBlockCoord(ui::Point point);
|
||||
String ElementResolve(int type, int ctype);
|
||||
String BasicParticleInfo(Particle const &sample_part);
|
||||
|
@ -1697,7 +1697,7 @@ void GameView::OnTick(float dt)
|
||||
ui::Point drawPoint2 = currentMouse;
|
||||
if (altBehaviour)
|
||||
drawPoint2 = lineSnapCoords(c->PointTranslate(drawPoint1), currentMouse);
|
||||
c->DrawLine(toolIndex, c->PointTranslate(drawPoint1), drawPoint2);
|
||||
c->DrawLine(toolIndex, c->PointTranslate(drawPoint1), c->PointTranslateNoClamp(drawPoint2));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2079,7 +2079,7 @@ void GameView::OnDraw()
|
||||
ren->SetSample(c->PointTranslate(currentMouse).X, c->PointTranslate(currentMouse).Y);
|
||||
if (showBrush && selectMode == SelectNone && (!zoomEnabled || zoomCursorFixed) && activeBrush && (isMouseDown || (currentMouse.X >= 0 && currentMouse.X < XRES && currentMouse.Y >= 0 && currentMouse.Y < YRES)))
|
||||
{
|
||||
ui::Point finalCurrentMouse = c->PointTranslate(currentMouse);
|
||||
ui::Point finalCurrentMouse = windTool ? c->PointTranslateNoClamp(currentMouse) : c->PointTranslate(currentMouse);
|
||||
ui::Point initialDrawPoint = drawPoint1;
|
||||
|
||||
if (wallBrush)
|
||||
|
Loading…
Reference in New Issue
Block a user