Skip to content

Commit

Permalink
Refactor MainWindow::refocus more
Browse files Browse the repository at this point in the history
Remove the local variable from `MainWindow::refocus` and add whitespace
to the if statement.
  • Loading branch information
michaelgregorius committed Sep 25, 2024
1 parent b6f2290 commit 6b9c4de
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,12 +978,10 @@ void MainWindow::refocus()
const auto gui = getGUI();

// Attempt to set the focus on the first of these editors that is not hidden...
const auto editorParents = std::array{ gui->songEditor()->parentWidget(), gui->patternEditor()->parentWidget(),
gui->pianoRoll()->parentWidget(), gui->automationEditor()->parentWidget() };

for (auto editorParent : editorParents)
for (auto editorParent : { gui->songEditor()->parentWidget(), gui->patternEditor()->parentWidget(),
gui->pianoRoll()->parentWidget(), gui->automationEditor()->parentWidget() })
{
if(!editorParent->isHidden())
if (!editorParent->isHidden())
{
editorParent->setFocus();
return;
Expand Down

0 comments on commit 6b9c4de

Please sign in to comment.