Skip to content

Commit

Permalink
qmlui: don't allow the deletion of all VC pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Nov 16, 2024
1 parent b23b6af commit 082ccae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qmlui/virtualconsole/virtualconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ void VirtualConsole::deletePage(int index)
if (index < 0 || index >= m_pages.count())
return;

if (m_pages.count() == 1)
return;

m_pages.at(index)->deleteChildren();
VCPage *page = m_pages.takeAt(index);
m_contextManager->unregisterContext(page->previewContext()->name());
Expand Down

0 comments on commit 082ccae

Please sign in to comment.