mirror of https://github.com/KLayout/klayout.git
Issue 1057 (Library#refresh enhancements) (#1060)
* Added Layout#refresh and added that to Library#refresh * Doc updates, clarification
This commit is contained in:
parent
19aac2abd7
commit
0df479b29c
|
|
@ -1560,6 +1560,14 @@ Layout::allocate_new_cell ()
|
|||
return new_index;
|
||||
}
|
||||
|
||||
void
|
||||
Layout::refresh ()
|
||||
{
|
||||
for (iterator c = begin (); c != end (); ++c) {
|
||||
c->update ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Layout::cleanup (const std::set<db::cell_index_type> &keep)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1632,6 +1632,14 @@ public:
|
|||
*/
|
||||
void cleanup (const std::set<db::cell_index_type> &keep = std::set<db::cell_index_type> ());
|
||||
|
||||
/**
|
||||
* @brief Calls "update" on all cells of the layout
|
||||
*
|
||||
* This will update PCells stored inside this layout, but will *not* update
|
||||
* PCells which are imported from a library.
|
||||
*/
|
||||
void refresh ();
|
||||
|
||||
/**
|
||||
* @brief Implementation of the undo operations
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ Library::is_retired (const db::cell_index_type library_cell_index) const
|
|||
void
|
||||
Library::refresh ()
|
||||
{
|
||||
layout ().refresh ();
|
||||
remap_to (this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2932,10 +2932,14 @@ Class<db::Cell> decl_Cell ("db", "Cell",
|
|||
"This method has been introduced in version 0.22.\n"
|
||||
) +
|
||||
gsi::method_ext ("refresh", &refresh,
|
||||
"@brief Refreshes the cell\n"
|
||||
"@brief Refreshes a proxy cell\n"
|
||||
"\n"
|
||||
"If the cell is a PCell or a proxy to a PCell in a library, this method recomputes the PCell.\n"
|
||||
"If the cell is a PCell variant, this method recomputes the PCell.\n"
|
||||
"If the cell is a library proxy, this method reloads the information from the library, but not the library itself.\n"
|
||||
"Note that if the cell is an PCell variant for a PCell coming from a library, this method will not recompute the PCell. "
|
||||
"Instead, you can use \\Library#refresh to recompute all PCells from that library.\n"
|
||||
"\n"
|
||||
"You can use \\Layout#refresh to refresh all cells from a layout.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.22.\n"
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -1089,6 +1089,14 @@ Class<db::Layout> decl_Layout ("db", "Layout",
|
|||
"@brief Gets the library this layout lives in or nil if the layout is not part of a library\n"
|
||||
"This attribute has been introduced in version 0.27.5."
|
||||
) +
|
||||
gsi::method ("refresh", &db::Layout::refresh,
|
||||
"@brief Calls \\Cell#refresh on all cells inside this layout\n"
|
||||
"This method is useful to recompute all PCells from a layout. Note that this does not "
|
||||
"update PCells which are linked from a library. To recompute PCells from a library, you need "
|
||||
"to use \\Library#refresh on the library object from which the PCells are imported.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.27.9."
|
||||
) +
|
||||
gsi::method ("add_meta_info", &db::Layout::add_meta_info, gsi::arg ("info"),
|
||||
"@brief Adds meta information to the layout\n"
|
||||
"See \\LayoutMetaInfo for details about layouts and meta information."
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ LibraryClass decl_Library ("db", "Library",
|
|||
gsi::method ("refresh", &db::Library::refresh,
|
||||
"@brief Updates all layouts using this library.\n"
|
||||
"This method will retire cells or update layouts in the attached clients.\n"
|
||||
"It will also recompute the PCells inside the library. "
|
||||
"\n"
|
||||
"This method has been introduced in version 0.27.8."
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue