Skip to content

Commit

Permalink
Use MDI window icons for Window menu actions. (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBColton committed Jul 30, 2020
1 parent dac120c commit b582fdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ void MainWindow::updateWindowMenu() {
QString text = tr("%1 %2").arg(numberString).arg(windowTitle);

QAction *action = _ui->menuWindow->addAction(
text, mdiSubWindow, [this, mdiSubWindow]() { _ui->mdiArea->setActiveSubWindow(mdiSubWindow); });
mdiSubWindow->windowIcon(), text, mdiSubWindow,
[this, mdiSubWindow]() { _ui->mdiArea->setActiveSubWindow(mdiSubWindow); });
windowActions.append(action);
action->setCheckable(true);
action->setChecked(mdiSubWindow == _ui->mdiArea->activeSubWindow());
Expand Down

0 comments on commit b582fdd

Please sign in to comment.