"Snap to Components" features now works when creating new components as well as when moving existing ones

This commit is contained in:
Bane Stojkovic
2022-10-24 09:38:09 +02:00
parent 37b1d1dbd9
commit 544c5323d5
3 changed files with 20 additions and 1 deletions
@@ -894,6 +894,8 @@ public class Presenter implements IPlugInPort {
if (instantiationManager.getComponentTypeSlot() != null) {
if (isSnapToGrid()) {
CalcUtils.snapPointToGrid(previousScaledPoint, currentProject.getGridSpacing());
} else if (isSnapToObjects()) {
CalcUtils.snapPointToObjects(previousScaledPoint, currentProject.getGridSpacing(), null, currentProject.getComponents());
}
boolean refresh = false;
switch (instantiationManager.getComponentTypeSlot().getCreationMethod()) {
@@ -4053,5 +4053,21 @@
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>4</major>
<minor>31</minor>
<build>0</build>
</versionNumber>
<releaseDate>2022-10-23 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>"Snap to Components" features now works when creating new components as well as when moving existing ones</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>