Fix way we calculate shift for empty sheet. Make it adjustable only if less
than default. --HG-- branch : develop
This commit is contained in:
parent
f99acfb8c9
commit
8888437b07
|
@ -359,8 +359,15 @@ void VContour::ResetAttributes()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
int VContour::EmptySheetEdgesCount() const
|
||||
{
|
||||
const qreal shift = qFuzzyIsNull(d->shift) ? ToPixel(0.5, Unit::Cm) : d->shift;
|
||||
return qFloor(EmptySheetEdge().length()/shift);
|
||||
qreal defaultShift = ToPixel(0.5, Unit::Cm);
|
||||
const qreal emptyEdgeLength = EmptySheetEdge().length();
|
||||
if (emptyEdgeLength < defaultShift)
|
||||
{
|
||||
defaultShift = emptyEdgeLength / 2.0;
|
||||
}
|
||||
|
||||
const qreal shift = (qFuzzyIsNull(d->shift) || d->shift > defaultShift) ? defaultShift : d->shift;
|
||||
return qFloor(emptyEdgeLength/shift);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user