fix: ignore clipboard origin when pasting to match P2 behaviour (#2336)

This commit is contained in:
Jordan 2023-07-07 17:23:37 +01:00 committed by GitHub
parent a669be2041
commit 888683d83b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,7 @@ public class FaweDelegateRegionManager {
.findByFile(schematicFile) .findByFile(schematicFile)
.getReader(new FileInputStream(schematicFile)) .getReader(new FileInputStream(schematicFile))
.read(); .read();
clip.setOrigin(clip.getRegion().getMinimumPoint());
clip.paste(scheditsession, to, true, true, true); clip.paste(scheditsession, to, true, true, true);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -152,6 +152,7 @@ public class FaweDelegateSchematicHandler {
final BlockVector3 to = BlockVector3 final BlockVector3 to = BlockVector3
.at(region.getMinimumPoint().getX() + xOffset, y_offset_actual, region.getMinimumPoint().getZ() + zOffset); .at(region.getMinimumPoint().getX() + xOffset, y_offset_actual, region.getMinimumPoint().getZ() + zOffset);
final Clipboard clipboard = schematic.getClipboard(); final Clipboard clipboard = schematic.getClipboard();
clipboard.setOrigin(clipboard.getRegion().getMinimumPoint());
clipboard.paste(editSession, to, true, false, true); clipboard.paste(editSession, to, true, false, true);
if (whenDone != null) { if (whenDone != null) {
whenDone.value = true; whenDone.value = true;