Set default focus to name field for new map/layout dialogs

This commit is contained in:
GriffinR 2025-08-15 13:19:33 -04:00
parent 71135a3ba0
commit ccc0ddd2f2
3 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project somewhat adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The MAJOR version number is bumped when there are **"Breaking Changes"** in the pret projects. For more on this, see [the manual page on breaking changes](https://huderlem.github.io/porymap/manual/breaking-changes.html).
## [Unreleased]
### Changed
- The name field now receives focus immediately for the new map/layout dialogs.
### Fixed
- Fix rare crash while quitting Porymap.

View File

@ -47,6 +47,7 @@ NewLayoutDialog::NewLayoutDialog(Project *project, const Layout *layoutToCopy, Q
} else {
restoreGeometry(porymapConfig.newLayoutDialogGeometry);
}
ui->lineEdit_Name->setFocus();
}
NewLayoutDialog::~NewLayoutDialog()

View File

@ -62,6 +62,7 @@ NewMapDialog::NewMapDialog(Project *project, const Map *mapToCopy, QWidget *pare
refresh();
restoreGeometry(porymapConfig.newMapDialogGeometry);
ui->lineEdit_Name->setFocus();
}
// Adding new map to an existing map list folder. Initialize settings accordingly.