Fix deleting connections by clearing text

This commit is contained in:
GriffinR 2023-05-29 19:18:38 -04:00
parent 9f06dcf9ac
commit 4ec5238abb
2 changed files with 4 additions and 3 deletions

View file

@ -13,6 +13,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
### Fixed
- Fix text boxes in the Palette Editor calculating color incorrectly.
- Fix default object sprites retaining dimensions and transparency of the previous sprite.
- Fix connections not being deleted when the map name text box is cleared.
## [5.1.1] - 2023-02-20
### Added

View file

@ -2490,7 +2490,7 @@ void MainWindow::on_spinBox_ConnectionOffset_valueChanged(int offset)
void MainWindow::on_comboBox_ConnectedMap_currentTextChanged(const QString &mapName)
{
if (editor->project->mapNames.contains(mapName)) {
if (mapName.isEmpty() || editor->project->mapNames.contains(mapName)) {
editor->setConnectionMap(mapName);
markMapEdited();
}
@ -2522,7 +2522,7 @@ void MainWindow::on_pushButton_ConfigureEncountersJSON_clicked() {
void MainWindow::on_comboBox_DiveMap_currentTextChanged(const QString &mapName)
{
if (editor->project->mapNames.contains(mapName)) {
if (mapName.isEmpty() || editor->project->mapNames.contains(mapName)) {
editor->updateDiveMap(mapName);
markMapEdited();
}
@ -2530,7 +2530,7 @@ void MainWindow::on_comboBox_DiveMap_currentTextChanged(const QString &mapName)
void MainWindow::on_comboBox_EmergeMap_currentTextChanged(const QString &mapName)
{
if (editor->project->mapNames.contains(mapName)) {
if (mapName.isEmpty() || editor->project->mapNames.contains(mapName)) {
editor->updateEmergeMap(mapName);
markMapEdited();
}