mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-22 05:57:41 +02:00
Apply property changes before switching tree node in properties editor
This commit is contained in:
@@ -308,6 +308,25 @@ PropertiesDialog::current_index_changed (const QModelIndex &index, const QModelI
|
|||||||
|
|
||||||
} else {
|
} 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 ()) {
|
if (mp_tree_model->parent (index).isValid ()) {
|
||||||
|
|
||||||
m_index = mp_tree_model->page_index (index);
|
m_index = mp_tree_model->page_index (index);
|
||||||
|
|||||||
Reference in New Issue
Block a user