diff --git a/src/layui/layui/layPropertiesDialog.cc b/src/layui/layui/layPropertiesDialog.cc index 6ecffff16..573d8c23d 100644 --- a/src/layui/layui/layPropertiesDialog.cc +++ b/src/layui/layui/layPropertiesDialog.cc @@ -308,6 +308,25 @@ PropertiesDialog::current_index_changed (const QModelIndex &index, const QModelI } else { + if (m_index >= 0 && m_index < int (mp_properties_pages.size ()) && ! mp_properties_pages [m_index]->readonly ()) { + + try { + + db::Transaction t (mp_manager, tl::to_string (QObject::tr ("Apply changes")), m_transaction_id); + + mp_properties_pages [m_index]->apply (); + + if (! t.is_empty ()) { + m_transaction_id = t.id (); + } + + } catch (...) { + } + + mp_properties_pages [m_index]->update (); + + } + if (mp_tree_model->parent (index).isValid ()) { m_index = mp_tree_model->page_index (index);