diff --git a/core/gridform.h b/core/gridform.h index 2f833d4..abb39b5 100644 --- a/core/gridform.h +++ b/core/gridform.h @@ -57,8 +57,7 @@ public: connect(m_form, &IForm::recordAdded, [this](){ //service()->save(form()->entity()); - m_tableModel->addRow(form()->entity()); - emit dataChanged(); + addRow(form()->entity()); }); connect(m_form, &IForm::recordUpdated, [this](){ //service()->update(form()->entity()); @@ -224,6 +223,12 @@ protected: } } + void addRow(QSharedPointer entity) + { + m_tableModel->addRow(entity); + emit dataChanged(); + } + void showImportButton() { QHBoxLayout *tbLayout = qobject_cast(this->toolbar()->layout()); diff --git a/core/settingsform.ui b/core/settingsform.ui index 3041060..9675024 100644 --- a/core/settingsform.ui +++ b/core/settingsform.ui @@ -9,8 +9,8 @@ 0 0 - 800 - 600 + 1000 + 700