Open andzs opened 4 years ago
Confirmed. Mapper makes objects rotatable. This is a bug in the importer routines. Thanks for the report!
I've got a fix and now I'm investigating why the defect was not caught by automated testing.
For the record, simplified test routine:
Actual behavior: The pattern happily rotates.
Expected behavior: The Rotate pattern tool is disabled and no pattern rotation is possible.
I'm reopening the issue as my original fix was wrong. The explanation is in https://github.com/OpenOrienteering/mapper/issues/1926#issuecomment-811033479.
My thoughts on this issue as of today.
I always read ISOM with the first interpretation in mind. The second one feels awkward to me. That said, I propose that we set the "pattern oriented to the north" flag when the imported symbol has a north orientation and all the objects using this symbol have zero rotation. If there is an object with non-zero rotation using a north-oriented symbol, we will reset the symbol pattern flags and issue an import warning.
Steps to reproduce
Open attached Ocad12 Sample.ocd file in OOM. Sample.zip
Rotate map (Map->Rotate) in OOM for 15 degrees for example. In OOM everything works fine. Appearance of symbols on map is correct after rotation.
Save this map back in Ocad 12 format as Sample_rotated.ocd
Open map Sample_rotated.ocd in Ocad12 and rotate it back (Map->Transform->Rotate Map) by -15 degreees and uncheck "Rotate objects with symbols oriented to North".
Actual behaviour
Resulting map is oriented back, but symbol appearance is wrong. Pattern of marshes and vegetation symbols is rotated because symbol definitions are lacking "Hatch/Structure oriented to north when rotating the map" property.
Expected behaviour
Editing Ocad files in OOM and saving back in ocd format should retain "Hatch/Structure oriented to north when rotating the map" property of symbols.
Configuration
Mapper Version: 0.9.3 Operating System: OS Name: Microsoft Windows 10 Pro OS Version: 10.0.18362 N/A Build 18362