diff --git a/src/lib/navigation/navigationbar.cpp b/src/lib/navigation/navigationbar.cpp index e913c0d9f..a86f70dc5 100644 --- a/src/lib/navigation/navigationbar.cpp +++ b/src/lib/navigation/navigationbar.cpp @@ -510,6 +510,7 @@ void NavigationBar::loadSettings() settings.endGroup(); m_layoutIds.removeDuplicates(); + m_layoutIds.removeAll(QString()); if (!m_layoutIds.contains(QSL("locationbar"))) { m_layoutIds.append(QSL("locationbar")); } diff --git a/src/lib/navigation/navigationbarconfigdialog.cpp b/src/lib/navigation/navigationbarconfigdialog.cpp index bb6d86ed3..b7e476185 100644 --- a/src/lib/navigation/navigationbarconfigdialog.cpp +++ b/src/lib/navigation/navigationbarconfigdialog.cpp @@ -55,7 +55,12 @@ void NavigationBarConfigDialog::loadSettings() ui->currentItems->clear(); for (const QString &id : qAsConst(m_navigationBar->m_layoutIds)) { - ui->currentItems->addItem(createItem(m_navigationBar->m_widgets.value(id))); + NavigationBar::WidgetData data = m_navigationBar->m_widgets.value(id); + if (data.id.isEmpty()) { + data.id = id; + data.name = id; + } + ui->currentItems->addItem(createItem(data)); } ui->availableItems->clear();