mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-05 05:27:39 +03:00
Enable save button when not auto-saving non-data changes (#9634)
* Fix #9501 * Also fix bug where context menu did not update when entry moved to very top or bottom of list
This commit is contained in:
parent
e1482dee2b
commit
5fb26d666a
5 changed files with 15 additions and 0 deletions
|
@ -1112,6 +1112,8 @@ void DatabaseWidget::connectDatabaseSignals()
|
|||
connect(m_db.data(), &Database::modified, this, &DatabaseWidget::onDatabaseModified);
|
||||
connect(m_db.data(), &Database::databaseSaved, this, &DatabaseWidget::databaseSaved);
|
||||
connect(m_db.data(), &Database::databaseFileChanged, this, &DatabaseWidget::reloadDatabaseFile);
|
||||
connect(m_db.data(), &Database::databaseNonDataChanged, this, &DatabaseWidget::databaseNonDataChanged);
|
||||
connect(m_db.data(), &Database::databaseNonDataChanged, this, &DatabaseWidget::onDatabaseNonDataChanged);
|
||||
}
|
||||
|
||||
void DatabaseWidget::loadDatabase(bool accepted)
|
||||
|
@ -1571,6 +1573,14 @@ void DatabaseWidget::triggerAutosaveTimer()
|
|||
QMetaObject::invokeMethod(m_autosaveTimer, "timeout");
|
||||
}
|
||||
|
||||
void DatabaseWidget::onDatabaseNonDataChanged()
|
||||
{
|
||||
// Force mark the database modified if we are not auto-saving non-data changes
|
||||
if (!config()->get(Config::AutoSaveNonDataChanges).toBool()) {
|
||||
m_db->markAsModified();
|
||||
}
|
||||
}
|
||||
|
||||
QString DatabaseWidget::getCurrentSearch()
|
||||
{
|
||||
return m_lastSearchText;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue