Verified Commit fff36538 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

bring back tabsReadOnly

parent 1c45a41d
......@@ -32,8 +32,11 @@ TabsModel::TabsModel(QObject *parent) : QAbstractListModel(parent) {
qDebug() << "Current tab changed to" << m_currentTab;
});
// The fallback tab must not be saved, it would overwrite our actual data.
m_tabsReadOnly = true;
// Make sure model always contains at least one tab
createEmptyTab();
m_tabsReadOnly = false;
}
QHash<int, QByteArray> TabsModel::roleNames() const
......@@ -196,7 +199,7 @@ bool TabsModel::loadTabs()
bool TabsModel::saveTabs() const
{
// only save if not in private mode
if (!m_privateMode) {
if (!m_privateMode && !m_tabsReadOnly) {
QString outputDir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)
+ QStringLiteral("/angelfish/");
......
......@@ -88,6 +88,7 @@ private:
int m_currentTab = 0;
QVector<TabState> m_tabs {};
bool m_privateMode = false;
bool m_tabsReadOnly = false;
signals:
void currentTabChanged();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment