mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-03 07:53:35 +02:00
WIP: undo/redo for applying a technology.
This commit is contained in:
@@ -59,6 +59,8 @@ LayoutHandle::LayoutHandle (db::Layout *layout, const std::string &filename)
|
||||
m_dirty (false),
|
||||
m_save_options_valid (false)
|
||||
{
|
||||
layout->technology_changed_event.add (this, &LayoutHandle::on_technology_changed);
|
||||
|
||||
// layouts in the managed layouts space participate in spare proxy cleanup
|
||||
layout->do_cleanup (true);
|
||||
|
||||
@@ -108,6 +110,12 @@ LayoutHandle::~LayoutHandle ()
|
||||
file_watcher ().remove_file (filename ());
|
||||
}
|
||||
|
||||
void
|
||||
LayoutHandle::on_technology_changed ()
|
||||
{
|
||||
technology_changed_event ();
|
||||
}
|
||||
|
||||
void
|
||||
LayoutHandle::layout_changed ()
|
||||
{
|
||||
@@ -232,7 +240,6 @@ LayoutHandle::set_tech_name (const std::string &tn)
|
||||
{
|
||||
if (mp_layout && tn != tech_name ()) {
|
||||
mp_layout->set_technology_name (tn);
|
||||
technology_changed_event ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +302,8 @@ private:
|
||||
bool m_save_options_valid;
|
||||
db::LoadLayoutOptions m_load_options;
|
||||
|
||||
void on_technology_changed ();
|
||||
|
||||
static std::map <std::string, LayoutHandle *> ms_dict;
|
||||
static tl::FileSystemWatcher *mp_file_watcher;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user