mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
Corrected failure to update root box and crosshair position when
rescaling the internal units. The former in particular can cause problems when moving the root box and importing cells from a script (same change as made to magic-8.1).
This commit is contained in:
@@ -1453,6 +1453,9 @@ void
|
||||
DBScaleEverything(scalen, scaled)
|
||||
int scalen, scaled;
|
||||
{
|
||||
void ToolScaleBox();
|
||||
void DBWScaleCrosshair();
|
||||
|
||||
int dbCellDefEnumFunc();
|
||||
LinkedCellDef *lhead, *lcd;
|
||||
|
||||
@@ -1484,6 +1487,12 @@ DBScaleEverything(scalen, scaled)
|
||||
/* Recovery of global plane pointers */
|
||||
MZAttachHintPlanes();
|
||||
|
||||
/* Modify root box */
|
||||
ToolScaleBox(scalen, scaled);
|
||||
|
||||
/* Modify crosshair position */
|
||||
DBWScaleCrosshair(scalen, scaled);
|
||||
|
||||
SigEnableInterrupts();
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +191,18 @@ ToolGetBox(rootDef, rootArea)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* ToolScaleBox --- Simple scaling of the root area box, no update needed */
|
||||
|
||||
void
|
||||
ToolScaleBox(scalen, scaled)
|
||||
int scalen;
|
||||
int scaled;
|
||||
{
|
||||
DBScalePoint(&boxRootArea.r_ll, scalen, scaled);
|
||||
DBScalePoint(&boxRootArea.r_ur, scalen, scaled);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@@ -474,6 +486,16 @@ DBWDrawCrosshair(window, plane)
|
||||
window->w_screenArea.r_xtop, p.p_y);
|
||||
}
|
||||
|
||||
/* DBWScaleCrosshair --- Simple scaling of the crosshair point, no update needed */
|
||||
|
||||
void
|
||||
DBWScaleCrosshair(scalen, scaled)
|
||||
int scalen;
|
||||
int scaled;
|
||||
{
|
||||
DBScalePoint(&crosshairPos, scalen, scaled);
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* DBWSetCrosshair --
|
||||
|
||||
Reference in New Issue
Block a user