mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 19:13:44 +00:00
Pcbnew dimension: remove misleading m_isDiamter in RADIAL
Presumably the intention was that the RADIAL dimension could also be a diameter type of dimension. However, as the recent inward/outward work showed, this is actually rather fraught, as a diameter type needs a different prefix (so now you can't always tell when it's user-set or not) and there are different numbers of control points. Possibly, a real "Diameter" type should be a new class - either a subclass of this one or another one entirely. In the meantime, remove the m_isDiameter member, as it's never set to anything other than 'false' and inaccessible.
This commit is contained in:
parent
f3056d45f0
commit
b1125bb0c2
@ -1251,7 +1251,6 @@ PCB_DIM_RADIAL::PCB_DIM_RADIAL( BOARD_ITEM* aParent ) :
|
||||
m_unitsFormat = DIM_UNITS_FORMAT::NO_SUFFIX;
|
||||
m_overrideTextEnabled = false;
|
||||
m_keepTextAligned = true;
|
||||
m_isDiameter = false;
|
||||
m_prefix = "R ";
|
||||
m_leaderLength = m_arrowLength * 3;
|
||||
}
|
||||
@ -1327,10 +1326,7 @@ void PCB_DIM_RADIAL::updateGeometry()
|
||||
|
||||
VECTOR2I radius( m_end - m_start );
|
||||
|
||||
if( m_isDiameter )
|
||||
m_measuredValue = KiROUND( radius.EuclideanNorm() * 2 );
|
||||
else
|
||||
m_measuredValue = KiROUND( radius.EuclideanNorm() );
|
||||
m_measuredValue = KiROUND( radius.EuclideanNorm() );
|
||||
|
||||
updateText();
|
||||
|
||||
|
@ -608,7 +608,6 @@ protected:
|
||||
void updateGeometry() override;
|
||||
|
||||
private:
|
||||
bool m_isDiameter;
|
||||
int m_leaderLength;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user