Add save and revert button to datagrid no implicit saves any more.

This commit is contained in:
eelke 2026-10-18 11:34:00 +02:00
parent 66267334c8
commit ee1a8ba48d
9 changed files with 153 additions and 12 deletions

View file

@ -60,6 +60,13 @@ void CrudTab::setConfig(Oid oid) //std::shared_ptr<OpenDatabase> db, const PgCla
void CrudTab::refresh()
{
if (m_crudModel->hasPendingChanges()) {
auto res = QMessageBox::question(this, "pgLab",
tr("There are unsaved changes. Refreshing discards them. Do you want to continue?"),
QMessageBox::Yes, QMessageBox::No);
if (res != QMessageBox::Yes)
return;
}
m_crudModel->loadData();
}