mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
Add shortcut for map list search bar
This commit is contained in:
@@ -9,6 +9,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
|
||||
- Add setting to display tile and metatile IDs in decimal instead of hexadecimal. Defaults to displaying both.
|
||||
- Add API functions for reading and writing text files.
|
||||
- Add a warning if multiple layouts have the same data file paths.
|
||||
- Add `Ctrl/Cmd+F` as a keyboard shortcut for the map list search bar.
|
||||
|
||||
### Changed
|
||||
- Porymap's .cfg files were replaced with .json. Any fields not listed in a config file are assumed to be the default value.
|
||||
|
||||
@@ -276,6 +276,7 @@ private slots:
|
||||
void mapListShortcut_ToggleEmptyFolders();
|
||||
void mapListShortcut_ExpandAll();
|
||||
void mapListShortcut_CollapseAll();
|
||||
void mapListShortcut_EditSearch();
|
||||
|
||||
void on_actionAbout_Porymap_triggered();
|
||||
void on_actionOpen_Log_File_triggered();
|
||||
|
||||
@@ -257,6 +257,10 @@ void MainWindow::initExtraShortcuts() {
|
||||
shortcutCollapse_All->setObjectName("shortcutCollapse_All");
|
||||
shortcutCollapse_All->setWhatsThis("Map List: Collapse all folders");
|
||||
|
||||
auto *shortcutMap_Search = new Shortcut(QKeySequence("Ctrl+F"), this, SLOT(mapListShortcut_EditSearch()));
|
||||
shortcutMap_Search->setObjectName("shortcutMap_Search");
|
||||
shortcutMap_Search->setWhatsThis("Map List: Edit Search Bar");
|
||||
|
||||
auto *shortcut_Open_Scripts = new Shortcut(QKeySequence(), ui->toolButton_Open_Scripts, SLOT(click()));
|
||||
shortcut_Open_Scripts->setObjectName("shortcut_Open_Scripts");
|
||||
shortcut_Open_Scripts->setWhatsThis("Open Map Scripts");
|
||||
@@ -3017,6 +3021,11 @@ void MainWindow::mapListShortcut_ToggleEmptyFolders() {
|
||||
if (toolbar) toolbar->toggleEmptyFolders();
|
||||
}
|
||||
|
||||
void MainWindow::mapListShortcut_EditSearch() {
|
||||
auto toolbar = getCurrentMapListToolBar();
|
||||
if (toolbar) toolbar->setSearchFocus();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAbout_Porymap_triggered()
|
||||
{
|
||||
if (!this->aboutWindow)
|
||||
|
||||
Reference in New Issue
Block a user