mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-04-19 04:36:09 +08:00
Sync changes from upstream repository
Co-authored-by: Steve Baer <steve@mcneel.com> Co-authored-by: Nathan Letwory <nathan@mcneel.com> Co-authored-by: Dale Lear <dalelear@mcneel.com>
This commit is contained in:
committed by
Will Pearson
parent
b844466e88
commit
799431a63b
@@ -814,17 +814,21 @@ ON_Leader* ON_Leader::CreateFromV5Leader(
|
||||
V6_leader->Internal_SetDimStyleFromV5Annotation(V5_leader,annotation_context);
|
||||
const ON_DimStyle& parent_dim_style = annotation_context->ParentDimStyle();
|
||||
|
||||
ON_2dVector textdir;
|
||||
if (V5_leader.GetTextDirection(textdir))
|
||||
{
|
||||
ON_3dVector dir;
|
||||
dir.Set(textdir.x, textdir.y, 0.0);
|
||||
if (0.0 > dir * plane.xaxis)
|
||||
{
|
||||
// override
|
||||
V6_leader->SetLeaderTextHorizontalAlignment(&parent_dim_style, ON::TextHorizontalAlignment::Right);
|
||||
}
|
||||
}
|
||||
//ON_2dVector textdir;
|
||||
//if (V5_leader.GetTextDirection(textdir))
|
||||
//{
|
||||
// ON_3dVector dir;
|
||||
// dir.Set(textdir.x, textdir.y, 0.0);
|
||||
// if (0.0 > dir * plane.xaxis)
|
||||
// {
|
||||
// // override
|
||||
// V6_leader->SetLeaderTextHorizontalAlignment(&parent_dim_style, ON::TextHorizontalAlignment::Right);
|
||||
// }
|
||||
//}
|
||||
|
||||
// ON::TextHorizontalAlignment::Auto behaves like all V5 leaders did
|
||||
V6_leader->SetLeaderTextHorizontalAlignment(&parent_dim_style, ON::TextHorizontalAlignment::Auto);
|
||||
|
||||
|
||||
// updates any m_overrides to be current and updates content hash.
|
||||
parent_dim_style.ContentHash();
|
||||
|
||||
Reference in New Issue
Block a user