disable the save button if there isn't anything to save
This commit is contained in:
@@ -539,6 +539,16 @@ bool DatabaseTabWidget::readOnly(int index)
|
||||
return indexDatabaseManagerStruct(index).readOnly;
|
||||
}
|
||||
|
||||
bool DatabaseTabWidget::canSave(int index)
|
||||
{
|
||||
if (index == -1) {
|
||||
index = currentIndex();
|
||||
}
|
||||
|
||||
const DatabaseManagerStruct& dbStruct = indexDatabaseManagerStruct(index);
|
||||
return !dbStruct.saveToFilename || (dbStruct.modified && !dbStruct.readOnly);
|
||||
}
|
||||
|
||||
bool DatabaseTabWidget::isModified(int index)
|
||||
{
|
||||
if (index == -1) {
|
||||
|
||||
Reference in New Issue
Block a user