Add save and revert button to datagrid no implicit saves any more.
This commit is contained in:
parent
66267334c8
commit
ee1a8ba48d
9 changed files with 153 additions and 12 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue