fix region map entries save bug where NONE map section was being saved in array
This commit is contained in:
parent
60e68116c4
commit
9e7ce82f45
3 changed files with 6 additions and 2 deletions
|
@ -185,7 +185,7 @@ void RegionMap::saveLayout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto sec : project->mapSectionNameToValue.keys()) {
|
for (auto sec : project->mapSectionNameToValue.keys()) {
|
||||||
if (!mapSecToMapEntry.contains(sec)) continue;
|
if (!mapSecToMapEntry.contains(sec) || sec == "MAPSEC_NONE") continue;
|
||||||
RegionMapEntry entry = mapSecToMapEntry.value(sec);
|
RegionMapEntry entry = mapSecToMapEntry.value(sec);
|
||||||
entries_text += " [" + sec + QString("]%1= {").arg(QString(" ").repeated(1 + longest - sec.length()))
|
entries_text += " [" + sec + QString("]%1= {").arg(QString(" ").repeated(1 + longest - sec.length()))
|
||||||
+ QString::number(entry.x) + ", " + QString::number(entry.y) + ", "
|
+ QString::number(entry.x) + ", " + QString::number(entry.y) + ", "
|
||||||
|
|
|
@ -1418,6 +1418,7 @@ void MainWindow::updateSelectedObjects() {
|
||||||
combo->setToolTip("The trainer type of this event object.\n"
|
combo->setToolTip("The trainer type of this event object.\n"
|
||||||
"If it is not a trainer, use NONE. SEE ALL DIRECTIONS\n"
|
"If it is not a trainer, use NONE. SEE ALL DIRECTIONS\n"
|
||||||
"should only be used with a sight radius of 1.");
|
"should only be used with a sight radius of 1.");
|
||||||
|
combo->setMinimumContentsLength(10);
|
||||||
|
|
||||||
int index = combo->findData(value);
|
int index = combo->findData(value);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
|
@ -1499,15 +1500,18 @@ void MainWindow::updateSelectedObjects() {
|
||||||
combo->setToolTip("The maximum number of metatiles this object\n"
|
combo->setToolTip("The maximum number of metatiles this object\n"
|
||||||
"is allowed to move left or right during its\n"
|
"is allowed to move left or right during its\n"
|
||||||
"normal movement behavior actions.");
|
"normal movement behavior actions.");
|
||||||
|
combo->setMinimumContentsLength(4);
|
||||||
} else if (key == "radius_y") {
|
} else if (key == "radius_y") {
|
||||||
combo->setToolTip("The maximum number of metatiles this object\n"
|
combo->setToolTip("The maximum number of metatiles this object\n"
|
||||||
"is allowed to move up or down during its\n"
|
"is allowed to move up or down during its\n"
|
||||||
"normal movement behavior actions.");
|
"normal movement behavior actions.");
|
||||||
|
combo->setMinimumContentsLength(4);
|
||||||
} else if (key == "script_label") {
|
} else if (key == "script_label") {
|
||||||
combo->setToolTip("The script which is executed with this event.");
|
combo->setToolTip("The script which is executed with this event.");
|
||||||
} else if (key == "sight_radius_tree_id") {
|
} else if (key == "sight_radius_tree_id") {
|
||||||
combo->setToolTip("The maximum sight range of a trainer,\n"
|
combo->setToolTip("The maximum sight range of a trainer,\n"
|
||||||
"OR the unique id of the berry tree.");
|
"OR the unique id of the berry tree.");
|
||||||
|
combo->setMinimumContentsLength(4);
|
||||||
} else {
|
} else {
|
||||||
combo->addItem(value);
|
combo->addItem(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ NoScrollComboBox::NoScrollComboBox(QWidget *parent)
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
setFocusPolicy(Qt::StrongFocus);
|
||||||
|
|
||||||
// Make speed a priority when loading comboboxes.
|
// Make speed a priority when loading comboboxes.
|
||||||
setMinimumContentsLength(20);// an arbitrary limit
|
setMinimumContentsLength(24);// an arbitrary limit
|
||||||
setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
|
setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
|
||||||
|
|
||||||
// Allow items to be searched by any part of the word, displaying all matches.
|
// Allow items to be searched by any part of the word, displaying all matches.
|
||||||
|
|
Loading…
Reference in a new issue