Ignore group expansion.

This commit is contained in:
Louis-Bertrand Varin 2017-04-04 10:21:45 -04:00
parent b7546b45b3
commit bce747e7f9
4 changed files with 14 additions and 0 deletions

View File

@ -113,6 +113,7 @@ void Config::init(const QString& fileName)
m_defaults.insert("UseGroupIconOnEntryCreation", false); m_defaults.insert("UseGroupIconOnEntryCreation", false);
m_defaults.insert("AutoTypeEntryTitleMatch", true); m_defaults.insert("AutoTypeEntryTitleMatch", true);
m_defaults.insert("UseGroupIconOnEntryCreation", true); m_defaults.insert("UseGroupIconOnEntryCreation", true);
m_defaults.insert("IgnoreGroupExpansion", false);
m_defaults.insert("security/clearclipboard", true); m_defaults.insert("security/clearclipboard", true);
m_defaults.insert("security/clearclipboardtimeout", 10); m_defaults.insert("security/clearclipboardtimeout", 10);
m_defaults.insert("security/lockdatabaseidle", false); m_defaults.insert("security/lockdatabaseidle", false);

View File

@ -296,6 +296,9 @@ void Group::setExpanded(bool expanded)
if (m_data.isExpanded != expanded) { if (m_data.isExpanded != expanded) {
m_data.isExpanded = expanded; m_data.isExpanded = expanded;
updateTimeinfo(); updateTimeinfo();
if (config()->get("IgnoreGroupExpansion").toBool()) {
return;
}
emit modified(); emit modified();
} }
} }

View File

@ -115,6 +115,7 @@ void SettingsWidget::loadSettings()
m_generalUi->minimizeOnCopyCheckBox->setChecked(config()->get("MinimizeOnCopy").toBool()); m_generalUi->minimizeOnCopyCheckBox->setChecked(config()->get("MinimizeOnCopy").toBool());
m_generalUi->useGroupIconOnEntryCreationCheckBox->setChecked(config()->get("UseGroupIconOnEntryCreation").toBool()); m_generalUi->useGroupIconOnEntryCreationCheckBox->setChecked(config()->get("UseGroupIconOnEntryCreation").toBool());
m_generalUi->autoTypeEntryTitleMatchCheckBox->setChecked(config()->get("AutoTypeEntryTitleMatch").toBool()); m_generalUi->autoTypeEntryTitleMatchCheckBox->setChecked(config()->get("AutoTypeEntryTitleMatch").toBool());
m_generalUi->ignoreGroupExpansionCheckBox->setChecked(config()->get("IgnoreGroupExpansion").toBool());
m_generalUi->languageComboBox->clear(); m_generalUi->languageComboBox->clear();
QList<QPair<QString, QString> > languages = Translator::availableLanguages(); QList<QPair<QString, QString> > languages = Translator::availableLanguages();
@ -180,6 +181,8 @@ void SettingsWidget::saveSettings()
config()->set("MinimizeOnCopy", m_generalUi->minimizeOnCopyCheckBox->isChecked()); config()->set("MinimizeOnCopy", m_generalUi->minimizeOnCopyCheckBox->isChecked());
config()->set("UseGroupIconOnEntryCreation", config()->set("UseGroupIconOnEntryCreation",
m_generalUi->useGroupIconOnEntryCreationCheckBox->isChecked()); m_generalUi->useGroupIconOnEntryCreationCheckBox->isChecked());
config()->set("IgnoreGroupExpansion",
m_generalUi->ignoreGroupExpansionCheckBox->isChecked());
config()->set("AutoTypeEntryTitleMatch", config()->set("AutoTypeEntryTitleMatch",
m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked()); m_generalUi->autoTypeEntryTitleMatchCheckBox->isChecked());
int currentLangIndex = m_generalUi->languageComboBox->currentIndex(); int currentLangIndex = m_generalUi->languageComboBox->currentIndex();

View File

@ -105,6 +105,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="ignoreGroupExpansionCheckBox">
<property name="text">
<string>Dot not mark a database as modified when groups are expanded</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QWidget" name="systraySettings" native="true"> <widget class="QWidget" name="systraySettings" native="true">
<layout class="QVBoxLayout" name="systrayLayout"> <layout class="QVBoxLayout" name="systrayLayout">