Fix map connection image exporting
Some checks failed
Build Porymap / build-linux (5.14.2) (push) Has been cancelled
Build Porymap / build-linux (6.8.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled

This commit is contained in:
GriffinR
2025-11-16 20:40:39 -05:00
parent 948aaeb2bf
commit 5f6246b394
2 changed files with 5 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
- Fix exported images on macOS using a different color space than in Porymap.
- Fix some `INCBIN` statements not being parsed correctly.
- Fix excessive logging if Porymap fails to monitor all map files.
- Fix map connections getting cut off in exported map images if they're on the same side as another short map connection.
## [6.2.0] - 2025-08-08
### Added

View File

@@ -614,10 +614,10 @@ QMargins MapImageExporter::getMargins(const Map *map) {
if (!targetMap) continue;
QRect rect = targetMap->getConnectionRect(dir);
if (dir == "up") margins.setTop(rect.height());
else if (dir == "down") margins.setBottom(rect.height());
else if (dir == "left") margins.setLeft(rect.width());
else if (dir == "right") margins.setRight(rect.width());
if (dir == "up") margins.setTop(qMax(rect.height(), margins.top()));
else if (dir == "down") margins.setBottom(qMax(rect.height(), margins.bottom()));
else if (dir == "left") margins.setLeft(qMax(rect.width(), margins.left()));
else if (dir == "right") margins.setRight(qMax(rect.width(), margins.right()));
}
}
if (m_settings.showGrid) {