Skip to content

Commit

Permalink
Fixed tabs in tab widget handler which were closable by double click …
Browse files Browse the repository at this point in the history
…in locked state.

albar965/littlenavmap#437
  • Loading branch information
albar965 committed Aug 23, 2019
1 parent 7e6c306 commit 8964817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/tabwidgethandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void TabWidgetHandler::tabCloseRequested(int index)
{
qDebug() << Q_FUNC_INFO << tabWidget->objectName();

if(tabWidget->count() > 1)
if(tabWidget->count() > 1 && !isLocked())
{
// int height = tabWidget->cornerWidget()->height();
int id = idForIndex(index);
Expand Down Expand Up @@ -489,6 +489,7 @@ void TabWidgetHandler::updateTabs()
tabWidget->setTabsClosable(!isLocked());

if(tabWidget->count() > 0)
// Dummy text change to force a re-layout of the widget - otherwise tabs remain large
tabWidget->setTabText(0, tabWidget->tabText(0));
}

Expand Down

0 comments on commit 8964817

Please sign in to comment.