Rotated labels in pasted components and building blocks were drawn in the wrong place

This commit is contained in:
Bane Stojkovic
2026-11-07 20:14:42 +01:00
parent b245396845
commit bff9e05843
2 changed files with 22 additions and 5 deletions
@@ -424,20 +424,21 @@ public class DrawingManager {
// Draw component slot in a separate composite.
if (componentSlot != null) {
g2dWrapper.startedDrawingComponent(project.getComponents().size());
g2dWrapper.setComposite(slotComposite);
for (IDIYComponent<?> component : componentSlot) {
// each component gets its own start/finish pair so that a transform, stroke or font it
// leaves behind (e.g. a rotated Label) is reverted before the next one is drawn
g2dWrapper.startedDrawingComponent(project.getComponents().size());
g2dWrapper.setComposite(slotComposite);
try {
component.draw(g2dWrapper, ComponentState.NORMAL,
drawOptions.contains(DrawOption.OUTLINE_MODE), project, g2dWrapper);
} catch (Exception e) {
LOG.error("Error drawing " + component.getName(), e);
failedComponents.add(component);
} finally {
g2dWrapper.finishedDrawingComponent();
}
}
g2dWrapper.finishedDrawingComponent();
}
// Draw control points of the component in the slot.
@@ -620,5 +620,21 @@
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>6</major>
<minor>11</minor>
<build>0</build>
</versionNumber>
<releaseDate>2026-11-07 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Rotated labels in pasted components and building blocks were drawn in the wrong place and at the wrong angle while following the mouse, until the components were placed</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
</a>
</java.util.Arrays_-ArrayList>