Bringing 'save all' on the same level than 'same'

- Taking the technology's settings for save options
- Deploying "libname", e.g. for GDS2
This commit is contained in:
Matthias Koefferlein
2025-11-22 23:57:40 +01:00
parent dacb3230d5
commit bbaaa14b2c
3 changed files with 25 additions and 53 deletions
-26
View File
@@ -300,32 +300,6 @@ LayoutHandle::set_save_options (const db::SaveLayoutOptions &options, bool valid
m_save_options_valid = valid;
}
void
LayoutHandle::update_save_options (db::SaveLayoutOptions &options)
{
#if defined(HAVE_QT)
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {
const lay::StreamWriterPluginDeclaration *decl = dynamic_cast <const lay::StreamWriterPluginDeclaration *> (&*cls);
if (! decl || decl->options_alias ()) {
continue;
}
std::unique_ptr<db::FormatSpecificWriterOptions> specific_options;
if (options.get_options (decl->format_name ())) {
specific_options.reset (options.get_options (decl->format_name ())->clone ());
} else {
specific_options.reset (decl->create_specific_options ());
}
if (specific_options.get ()) {
options.set_options (specific_options.release ());
}
}
#endif
}
void
LayoutHandle::save_as (const std::string &fn, tl::OutputStream::OutputStreamMode om, const db::SaveLayoutOptions &options, bool update, int keep_backups)
{
-9
View File
@@ -242,15 +242,6 @@ public:
return m_save_options;
}
/**
* @brief Updates the given save options with attributes from this cell view
*
* Some formats will initialize attributes from the cell view and the layout's
* metadata (example: libname of GDS2). This method will update the options
* if the layout provides attributes for initializing the latter.
*/
void update_save_options (db::SaveLayoutOptions &options);
/**
* @brief Gets a flag indicating whether the save options are valid
*