CHANGES
Depending on the fact the segment relies on contacts or not the translate method behavior is different (useful pour device layout)
This commit is contained in:
parent
dda0af6966
commit
e208fbeb2f
|
@ -125,6 +125,16 @@ void Horizontal::translate(const DbU::Unit& dx, const DbU::Unit& dy)
|
|||
invalidate(true);
|
||||
_y += dy;
|
||||
}
|
||||
if (dx != 0) {
|
||||
if (!getSourceHook()->isAttached()) {
|
||||
invalidate(true);
|
||||
_dxSource += dx;
|
||||
}
|
||||
if (!getTargetHook()->isAttached()) {
|
||||
invalidate(true);
|
||||
_dxTarget += dx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Horizontal::setY(const DbU::Unit& y)
|
||||
|
|
|
@ -128,6 +128,16 @@ void Vertical::translate(const DbU::Unit& dx, const DbU::Unit& dy)
|
|||
invalidate(true);
|
||||
_x += dx;
|
||||
}
|
||||
if (dy != 0) {
|
||||
if (!getSourceHook()->isAttached()) {
|
||||
invalidate(true);
|
||||
_dySource += dy;
|
||||
}
|
||||
if (!getTargetHook()->isAttached()) {
|
||||
invalidate(true);
|
||||
_dyTarget += dy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Vertical::setX(const DbU::Unit& x)
|
||||
|
|
Loading…
Reference in New Issue