Get modified status directly from database object instead of using window title

This commit is contained in:
Weslly 2017-03-20 23:29:36 -03:00
parent a87fab8d18
commit 18b5b76a80
3 changed files with 16 additions and 5 deletions

View file

@ -526,6 +526,15 @@ bool DatabaseTabWidget::readOnly(int index)
return indexDatabaseManagerStruct(index).readOnly;
}
bool DatabaseTabWidget::isModified(int index)
{
if (index == -1) {
index = currentIndex();
}
return indexDatabaseManagerStruct(index).modified;
}
void DatabaseTabWidget::updateTabName(Database* db)
{
int index = databaseIndex(db);