Skip to content

Commit

Permalink
Issue LibreCAD#1697: doc activation order at closing
Browse files Browse the repository at this point in the history
When closing a document, activate the latest opened if exists.

This is not yet usage based activation.
  • Loading branch information
dxli committed Oct 7, 2023
1 parent 6f49816 commit 5e701b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions librecad/src/main/qc_applicationwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,12 @@ void QC_ApplicationWindow::doClose(QC_MDIWindow * w, bool activateNext)
actionHandler->set_view(nullptr);
actionHandler->set_document(nullptr);

if (activateNext && window_list.count() > 0) {
if (activateNext && !window_list.empty()) {
if (nullptr != parentWindow) {
doActivate(parentWindow);
}
else {
doActivate(window_list.front());
doActivate(window_list.back());
}
}

Expand Down

0 comments on commit 5e701b7

Please sign in to comment.