Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCD support improvements #1796

Merged
merged 7 commits into from
Dec 20, 2020
Merged

OCD support improvements #1796

merged 7 commits into from
Dec 20, 2020

Conversation

dg0yt
Copy link
Member

@dg0yt dg0yt commented Dec 13, 2020

Avoid some pointless imports of OCD line symbols as combined symbols.
Fix export of area-with-border even for (some) borders which are combined symbols.
Turn Q_UNREACHABLE into proper exceptions in order to avoid aborting or UB.

@dg0yt dg0yt force-pushed the ocd-combined-symbols branch from ce79c9e to 83be602 Compare December 13, 2020 06:47
When "double lines" are not explicitly turned of for a line symbol,
but all related widths are zero, there is no visible result.
There is no significant benefit in preserving all double line
properties by construction of a CombinedSymbol, but there is the
downside of Mapper of having shortcomings in exporting nested
CombinedSymbols (e.g. area with border line). Also, the user interface
is less convenient for CombinedSymbol when the user expects to edit
a simple line.
We must create breakdown records for all CombinedSymbol objects, even
if they are mapped to a simple OCD symbol. The breakdown record is
needed during the export of path objects having a CombinedSymbol.
(Symbols triggering the crash have been created on OCD import for
some area symbols with border.)
... to the "case" branch handling CombinedSymbol with 2 parts.
This the only case which we handle for area-with-border, so this
should be reflected by the structure of the code.
In particular, use the local `border_duplicate` as much as possible,
so that requirements on the type of `border_symbol` are reduced to
class `Symbol` in that block. This change prepares the handling of
border lines which are CombinedSymbol in Mapper.
Handle border lines which are represented by CombinedSymbol in Mapper.
Such symbols were created by OcdFileImport in the past, but could
also be constructed manually.
@dg0yt dg0yt force-pushed the ocd-combined-symbols branch from 83be602 to 8c6be46 Compare December 20, 2020 09:31
@dg0yt dg0yt merged commit 838f2e3 into master Dec 20, 2020
@dg0yt dg0yt deleted the ocd-combined-symbols branch December 20, 2020 10:29
@dg0yt dg0yt added this to the v0.9.5 milestone Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant