Merge pull request #5048 from godric3/map-editor-remove-parent-chains

remove chains of `parent()->parent()` in map editor
This commit is contained in:
Ivan Savenko authored and GitHub committed 2024-12-21 15:43:48 +02:00
commit 189e7dc94d
7 files changed
+13 -9

No files matched your search

+2 -2
View File
@@ -202,12 +202,12 @@ void PlayerParams::on_townSelect_clicked()
QObject::connect(&l, &ObjectPickerLayer::selectionMade, this, &PlayerParams::onTownPicked);
}
dynamic_cast<QWidget*>(parent()->parent()->parent()->parent())->hide();
controller.settingsDialog->hide();
}
void PlayerParams::onTownPicked(const CGObjectInstance * obj)
{
dynamic_cast<QWidget*>(parent()->parent()->parent()->parent())->show();
controller.settingsDialog->show();
for(int lvl : {0, 1})
{