Skip to content

Commit

Permalink
DlgPrefController: rename function, remove blank line
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Jan 27, 2025
1 parent 5a1dbc7 commit c48c17a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/controllers/dlgprefcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ unsigned int DlgPrefController::getNumberOfVisibleTabs() {
return visibleTabsCount;
}

int DlgPrefController::getIndexOfFirstVisibleTabs() {
int DlgPrefController::getIndexOfFirstVisibleTab() {
for (int tabIdx = 0; tabIdx < m_ui.controllerTabs->count(); ++tabIdx) {
if (m_ui.controllerTabs->isTabVisible(tabIdx)) {
return tabIdx;
Expand Down Expand Up @@ -1059,7 +1059,6 @@ void DlgPrefController::slotShowMapping(std::shared_ptr<LegacyControllerMapping>
}

// Show or hide the settings tab based on the presence of settings

m_ui.controllerTabs->setTabVisible(
m_settingsTabIndex, pMapping && !pMapping->getSettings().isEmpty());

Expand Down Expand Up @@ -1148,7 +1147,7 @@ void DlgPrefController::slotShowMapping(std::shared_ptr<LegacyControllerMapping>
m_ui.controllerTabs->setVisible(getNumberOfVisibleTabs() > 0);

// Set the first visible tab as the current tab
int firstVisibleTabIndex = getIndexOfFirstVisibleTabs();
int firstVisibleTabIndex = getIndexOfFirstVisibleTab();
if (firstVisibleTabIndex >= 0) {
m_ui.controllerTabs->setCurrentIndex(firstVisibleTabIndex);
}
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/dlgprefcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DlgPrefController : public DlgPreferencePage {
bool saveMapping();
void initTableView(QTableView* pTable);
unsigned int getNumberOfVisibleTabs();
int getIndexOfFirstVisibleTabs();
int getIndexOfFirstVisibleTab();

/// Set dirty state (i.e. changes have been made).
///
Expand Down

0 comments on commit c48c17a

Please sign in to comment.