Merge branch 'master' into metatile-attr

This commit is contained in:
GriffinR 2022-10-29 11:43:00 -04:00 committed by GitHub
commit eb80ee86f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 17 deletions

View file

@ -42,6 +42,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- The heal location prefixes `SPAWN_` and `HEAL_LOCATION_` may now be used interchangeably. - The heal location prefixes `SPAWN_` and `HEAL_LOCATION_` may now be used interchangeably.
- The number and order of entries in the heal location data tables can now be changed arbitrarily, and independently of each other. - The number and order of entries in the heal location data tables can now be changed arbitrarily, and independently of each other.
- The metatile behavior is now displayed in the bottom bar mouseover text. - The metatile behavior is now displayed in the bottom bar mouseover text.
- Number values are now allowed in the Tileset Editor's Metatile Behavior field.
- Removed some unnecessary error logs from the scripting API and added new useful ones. - Removed some unnecessary error logs from the scripting API and added new useful ones.
- If any JSON data is the incorrect type Porymap will now attempt to convert it. - If any JSON data is the incorrect type Porymap will now attempt to convert it.
@ -62,11 +63,11 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- Fix drawing large amounts of text with the scripting API causing a significant drop in performance. - Fix drawing large amounts of text with the scripting API causing a significant drop in performance.
- Silence unnecessary error logging when parsing C defines Porymap doesn't use. - Silence unnecessary error logging when parsing C defines Porymap doesn't use.
- Fix some windows like the Tileset Editor not raising to the front when reactivated. - Fix some windows like the Tileset Editor not raising to the front when reactivated.
- Metatile behaviors with no constant will now display their value in the Tileset Editor.
- Fix incorrect limits on Floor Number and Border Width/Height in the New Map Options window. - Fix incorrect limits on Floor Number and Border Width/Height in the New Map Options window.
- Fix Border Width/Height being set to 0 when creating a new map from an existing layout. - Fix Border Width/Height being set to 0 when creating a new map from an existing layout.
- Fix certain UI elements not highlighting red on some platforms. - Fix certain UI elements not highlighting red on some platforms.
- Fix Open Config Folder not responding - Fix Open Config Folder not responding
- Properly update the minimum offset for a connection when the map is changed.
## [4.5.0] - 2021-12-26 ## [4.5.0] - 2021-12-26
### Added ### Added

View file

@ -67,10 +67,6 @@ public:
ObjectFrame(ObjectEvent *object, QWidget *parent = nullptr) ObjectFrame(ObjectEvent *object, QWidget *parent = nullptr)
: EventFrame(object, parent), object(object) {} : EventFrame(object, parent), object(object) {}
virtual ~ObjectFrame() {
delete this->scriptCompleter;
}
virtual void setup() override; virtual void setup() override;
virtual void initialize() override; virtual void initialize() override;
virtual void connectSignals() override; virtual void connectSignals() override;
@ -148,10 +144,6 @@ public:
TriggerFrame(TriggerEvent *trigger, QWidget *parent = nullptr) TriggerFrame(TriggerEvent *trigger, QWidget *parent = nullptr)
: EventFrame(trigger, parent), trigger(trigger) {} : EventFrame(trigger, parent), trigger(trigger) {}
virtual ~TriggerFrame() {
delete this->scriptCompleter;
}
virtual void setup() override; virtual void setup() override;
virtual void initialize() override; virtual void initialize() override;
virtual void connectSignals() override; virtual void connectSignals() override;
@ -198,10 +190,6 @@ public:
SignFrame(SignEvent *sign, QWidget *parent = nullptr) SignFrame(SignEvent *sign, QWidget *parent = nullptr)
: EventFrame(sign, parent), sign(sign) {} : EventFrame(sign, parent), sign(sign) {}
virtual ~SignFrame() {
delete this->scriptCompleter;
}
virtual void setup() override; virtual void setup() override;
virtual void initialize() override; virtual void initialize() override;
virtual void connectSignals() override; virtual void connectSignals() override;

View file

@ -18,12 +18,15 @@ Tileset::Tileset(const Tileset &other)
metatile_attrs_label(other.metatile_attrs_label), metatile_attrs_label(other.metatile_attrs_label),
metatile_attrs_path(other.metatile_attrs_path), metatile_attrs_path(other.metatile_attrs_path),
tilesImagePath(other.tilesImagePath), tilesImagePath(other.tilesImagePath),
tilesImage(other.tilesImage), tilesImage(other.tilesImage.copy()),
palettePaths(other.palettePaths), palettePaths(other.palettePaths),
tiles(other.tiles),
palettes(other.palettes), palettes(other.palettes),
palettePreviews(other.palettePreviews) palettePreviews(other.palettePreviews)
{ {
for (auto tile : other.tiles) {
tiles.append(tile.copy());
}
for (auto *metatile : other.metatiles) { for (auto *metatile : other.metatiles) {
metatiles.append(new Metatile(*metatile)); metatiles.append(new Metatile(*metatile));
} }
@ -39,12 +42,16 @@ Tileset &Tileset::operator=(const Tileset &other) {
metatile_attrs_label = other.metatile_attrs_label; metatile_attrs_label = other.metatile_attrs_label;
metatile_attrs_path = other.metatile_attrs_path; metatile_attrs_path = other.metatile_attrs_path;
tilesImagePath = other.tilesImagePath; tilesImagePath = other.tilesImagePath;
tilesImage = other.tilesImage; tilesImage = other.tilesImage.copy();
palettePaths = other.palettePaths; palettePaths = other.palettePaths;
tiles = other.tiles;
palettes = other.palettes; palettes = other.palettes;
palettePreviews = other.palettePreviews; palettePreviews = other.palettePreviews;
tiles.clear();
for (auto tile : other.tiles) {
tiles.append(tile.copy());
}
metatiles.clear(); metatiles.clear();
for (auto *metatile : other.metatiles) { for (auto *metatile : other.metatiles) {
metatiles.append(new Metatile(*metatile)); metatiles.append(new Metatile(*metatile));

View file

@ -1753,6 +1753,12 @@ void Editor::setConnectionMap(QString mapName) {
setConnectionEditControlsEnabled(true); setConnectionEditControlsEnabled(true);
selected_connection_item->connection->map_name = mapName; selected_connection_item->connection->map_name = mapName;
setCurrentConnectionDirection(selected_connection_item->connection->direction); setCurrentConnectionDirection(selected_connection_item->connection->direction);
// New map may have a different minimum offset than the last one. The maximum will be the same.
int min = selected_connection_item->getMinOffset();
ui->spinBox_ConnectionOffset->setMinimum(min);
onConnectionOffsetChanged(qMax(min, selected_connection_item->connection->offset));
updateMirroredConnectionMap(selected_connection_item->connection, originalMapName); updateMirroredConnectionMap(selected_connection_item->connection, originalMapName);
maskNonVisibleConnectionTiles(); maskNonVisibleConnectionTiles();
} }

View file

@ -610,6 +610,7 @@ void MainWindow::on_action_Reload_Project_triggered() {
warning.setText("WARNING"); warning.setText("WARNING");
warning.setInformativeText("Reloading this project will discard any unsaved changes."); warning.setInformativeText("Reloading this project will discard any unsaved changes.");
warning.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); warning.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
warning.setDefaultButton(QMessageBox::Cancel);
warning.setIcon(QMessageBox::Warning); warning.setIcon(QMessageBox::Warning);
if (warning.exec() == QMessageBox::Ok) { if (warning.exec() == QMessageBox::Ok) {

View file

@ -69,6 +69,7 @@ void Project::initSignals() {
notice.setInformativeText(QString("The file %1 has changed on disk. Would you like to reload the project?") notice.setInformativeText(QString("The file %1 has changed on disk. Would you like to reload the project?")
.arg(changed.remove(this->root + "/"))); .arg(changed.remove(this->root + "/")));
notice.setStandardButtons(QMessageBox::No | QMessageBox::Yes); notice.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
notice.setDefaultButton(QMessageBox::No);
notice.setIcon(QMessageBox::Question); notice.setIcon(QMessageBox::Question);
QCheckBox showAgainCheck("Do not ask again."); QCheckBox showAgainCheck("Do not ask again.");

View file

@ -42,6 +42,8 @@ void NewMapPopup::init() {
ui->spinBox_NewMap_Height->setMaximum(project->getMaxMapHeight()); ui->spinBox_NewMap_Height->setMaximum(project->getMaxMapHeight());
ui->spinBox_NewMap_BorderWidth->setMinimum(1); ui->spinBox_NewMap_BorderWidth->setMinimum(1);
ui->spinBox_NewMap_BorderHeight->setMinimum(1); ui->spinBox_NewMap_BorderHeight->setMinimum(1);
ui->spinBox_NewMap_BorderWidth->setMaximum(MAX_BORDER_WIDTH);
ui->spinBox_NewMap_BorderHeight->setMaximum(MAX_BORDER_HEIGHT);
ui->spinBox_NewMap_Floor_Number->setMinimum(-128); ui->spinBox_NewMap_Floor_Number->setMinimum(-128);
ui->spinBox_NewMap_Floor_Number->setMaximum(127); ui->spinBox_NewMap_Floor_Number->setMaximum(127);