Skip to content

OcdFileImport: Fix import of Rectangle symbols and objects - #2043

Merged
dg0yt merged 1 commit into
OpenOrienteering:masterfrom
dl3sdo:rectanglesymbolimport
Mar 23, 2022
Merged

OcdFileImport: Fix import of Rectangle symbols and objects#2043
dg0yt merged 1 commit into
OpenOrienteering:masterfrom
dl3sdo:rectanglesymbolimport

Conversation

@dl3sdo

Copy link
Copy Markdown
Member

The 'GridFlags' field consists of 3 bits: 1=Grid On, 2=Numbering On, 4=Numbered from the bottom
The symbol import previously only considered Grid On and mapped 'Numbered from the bottom' to Bit 1 instead.
When importing Rectangle objects the 'Numbered from the bottom' property was applied just the other way around.

@dl3sdo

Copy link
Copy Markdown
MemberAuthor

Please find attached an .ocd12 sample file and a screenshot how it appears in OCAD12:
OCAD_Example
RectSymbols2_ocd12.zip

The 'GridFlags' field consists of 3 bits:
1=Grid On, 2=Numbering On, 4=Numbered from the bottom
The symbol import previously only considered 'Grid On' and mapped
'Numbered from the bottom' to Bit 1 instead.
When importing Rectangle objects the 'Numbered from the bottom'
property was applied just the other way around.
@dl3sdo
dl3sdoforce-pushed the rectanglesymbolimport branch from 46959ef to 14ba4daCompareMarch 1, 2022 17:30
@lpechacek

Copy link
Copy Markdown
Member

Close/reopen to trigger CI run.

@lpechaceklpechacek reopened this Mar 16, 2022

@dg0ytdg0yt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test myself, but the code changes LGTM.

@dg0ytdg0yt added the reviewed PR was reviewed and is ready to be merged label Mar 22, 2022
@dg0yt
dg0yt merged commit 7b4824d into OpenOrienteering:masterMar 23, 2022
@dg0yt

Copy link
Copy Markdown
Member

We should give names to the flags, but I don't want to deal with this now.
Thanks @dl3sdo.

@dl3sdo
dl3sdo deleted the rectanglesymbolimport branch March 23, 2022 12:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewedPR was reviewed and is ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dl3sdo@lpechacek@dg0yt