mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-03 06:43:29 +02:00
Fixed #115 (Reader options are not persisted).
This commit is contained in:
@@ -250,9 +250,11 @@ LoadLayoutOptionsDialog::edit_global_options (lay::PluginRoot *config_root, lay:
|
||||
config_root->config_set (cfg_reader_options_show_always, tl::to_string (m_show_always));
|
||||
|
||||
i = 0;
|
||||
technologies->begin_updates ();
|
||||
for (lay::Technologies::iterator t = technologies->begin (); t != technologies->end () && i < m_opt_array.size (); ++t, ++i) {
|
||||
technologies->begin ()[i].set_load_layout_options (m_opt_array [i]);
|
||||
}
|
||||
technologies->end_updates ();
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@@ -60,17 +60,24 @@ Technologies::operator= (const Technologies &other)
|
||||
{
|
||||
if (&other != this) {
|
||||
m_technologies = other.m_technologies;
|
||||
technologies_changed_event ();
|
||||
for (iterator i = begin (); i != end (); ++i) {
|
||||
i->technology_changed_with_sender_event.add (this, &Technologies::technology_changed);
|
||||
}
|
||||
technologies_changed ();
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
static std::auto_ptr<lay::Technologies> sp_technologies;
|
||||
|
||||
lay::Technologies *
|
||||
Technologies::instance ()
|
||||
{
|
||||
static lay::Technologies s_technologies;
|
||||
return &s_technologies;
|
||||
if (! sp_technologies.get ()) {
|
||||
sp_technologies.reset (new lay::Technologies ());
|
||||
}
|
||||
return sp_technologies.get ();
|
||||
}
|
||||
|
||||
static tl::XMLElementList xml_elements ()
|
||||
@@ -167,6 +174,16 @@ Technologies::clear ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Technologies::technology_changed (Technology *t)
|
||||
{
|
||||
if (m_in_update) {
|
||||
m_changed = true;
|
||||
} else {
|
||||
technology_changed_event (t);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Technologies::technologies_changed ()
|
||||
{
|
||||
|
||||
@@ -234,10 +234,7 @@ protected:
|
||||
/**
|
||||
* @brief Forward the event from the individual technologies
|
||||
*/
|
||||
void technology_changed (Technology *t)
|
||||
{
|
||||
technology_changed_event (t);
|
||||
}
|
||||
void technology_changed (Technology *t);
|
||||
|
||||
/**
|
||||
* @brief Sends the technologies_changed event
|
||||
|
||||
Reference in New Issue
Block a user