Merge branch 'master' into fix-tilemap
This commit is contained in:
commit
b6c97e845b
2 changed files with 20 additions and 2 deletions
|
@ -8,8 +8,12 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
|||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Fix tilesets that share part of their name loading incorrectly.
|
||||
- Fix events being hidden behind connecting maps.
|
||||
- Fix some minor visual issues on the Connections tab.
|
||||
- Fix bug which caused encounter configurator to crash if slots in fields containing groups were deleted.
|
||||
- Fix bug which caused encounter configurator to crash if last field was deleted.
|
||||
- Fix map render when collision view was active while map changed.
|
||||
- Fix the updated pokefirered region map graphics appearing in grayscale.
|
||||
|
||||
## [5.1.0] - 2023-01-22
|
||||
|
|
|
@ -112,6 +112,8 @@ void Editor::setEditingCollision() {
|
|||
}
|
||||
if (map_item) {
|
||||
map_item->paintingMode = MapPixmapItem::PaintMode::Metatiles;
|
||||
map_item->draw();
|
||||
map_item->setVisible(true);
|
||||
}
|
||||
if (events_group) {
|
||||
events_group->setVisible(false);
|
||||
|
@ -468,7 +470,7 @@ void Editor::configureEncounterJSON(QWidget *window) {
|
|||
QVBoxLayout *slotChoiceLayout = new QVBoxLayout;
|
||||
if (useGroups) {
|
||||
QComboBox *groupCombo = new QComboBox;
|
||||
connect(groupCombo, QOverload<const QString &>::of(&QComboBox::textActivated), [&tempFields, ¤tField, index](QString newGroupName) {
|
||||
connect(groupCombo, QOverload<const QString &>::of(&QComboBox::textActivated), [&tempFields, ¤tField, &updateTotal, index](QString newGroupName) {
|
||||
for (EncounterField &field : tempFields) {
|
||||
if (field.name == currentField.name) {
|
||||
for (auto groupNameIterator : field.groups) {
|
||||
|
@ -485,6 +487,7 @@ void Editor::configureEncounterJSON(QWidget *window) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
updateTotal(currentField);
|
||||
});
|
||||
for (auto groupNameIterator : currentField.groups) {
|
||||
groupCombo->addItem(groupNameIterator.first);
|
||||
|
@ -542,6 +545,12 @@ void Editor::configureEncounterJSON(QWidget *window) {
|
|||
delete slot;
|
||||
}
|
||||
|
||||
if (!tempFields.size()) {
|
||||
return;
|
||||
}
|
||||
if (index >= tempFields.size()) {
|
||||
index = tempFields.size() - 1;
|
||||
}
|
||||
EncounterField ¤tField = tempFields[index];
|
||||
for (int i = 0; i < currentField.encounterRates.size(); i++) {
|
||||
grid.addWidget(createNewSlot(i, currentField), i / 4 + 1, i % 4);
|
||||
|
@ -602,10 +611,15 @@ void Editor::configureEncounterJSON(QWidget *window) {
|
|||
removeSlotButton->setFlat(true);
|
||||
connect(removeSlotButton, &QPushButton::clicked, [&fieldChoices, &drawSlotWidgets, &tempFields]() {
|
||||
EncounterField &field = tempFields[fieldChoices->currentIndex()];
|
||||
if (field.encounterRates.size() > 1)
|
||||
int lastIndex = field.encounterRates.size() - 1;
|
||||
if (lastIndex > 0)
|
||||
field.encounterRates.removeLast();
|
||||
for (auto &g : field.groups) {
|
||||
field.groups[g.first].removeAll(lastIndex);
|
||||
}
|
||||
drawSlotWidgets(fieldChoices->currentIndex());
|
||||
});
|
||||
// TODO: method for editing groups?
|
||||
|
||||
QFrame firstRow;
|
||||
QHBoxLayout firstRowLayout;
|
||||
|
|
Loading…
Reference in a new issue