mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-13 02:32:09 +10:00
Rotated labels in pasted components and building blocks were drawn in the wrong place
This commit is contained in:
@@ -424,20 +424,21 @@ public class DrawingManager {
|
|||||||
|
|
||||||
// Draw component slot in a separate composite.
|
// Draw component slot in a separate composite.
|
||||||
if (componentSlot != null) {
|
if (componentSlot != null) {
|
||||||
g2dWrapper.startedDrawingComponent(project.getComponents().size());
|
|
||||||
g2dWrapper.setComposite(slotComposite);
|
|
||||||
for (IDIYComponent<?> component : componentSlot) {
|
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 {
|
try {
|
||||||
|
|
||||||
component.draw(g2dWrapper, ComponentState.NORMAL,
|
component.draw(g2dWrapper, ComponentState.NORMAL,
|
||||||
drawOptions.contains(DrawOption.OUTLINE_MODE), project, g2dWrapper);
|
drawOptions.contains(DrawOption.OUTLINE_MODE), project, g2dWrapper);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Error drawing " + component.getName(), e);
|
LOG.error("Error drawing " + component.getName(), e);
|
||||||
failedComponents.add(component);
|
failedComponents.add(component);
|
||||||
|
} finally {
|
||||||
|
g2dWrapper.finishedDrawingComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g2dWrapper.finishedDrawingComponent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw control points of the component in the slot.
|
// Draw control points of the component in the slot.
|
||||||
|
|||||||
@@ -620,5 +620,21 @@
|
|||||||
</changes>
|
</changes>
|
||||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||||
</org.diylc.appframework.update.Version>
|
</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>
|
</a>
|
||||||
</java.util.Arrays_-ArrayList>
|
</java.util.Arrays_-ArrayList>
|
||||||
|
|||||||
Reference in New Issue
Block a user