mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-01 18:37:50 +02:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user