mirror of https://github.com/KLayout/klayout.git
Some enhancements to package manager dialog: mute an assertion that sometimes happened due to update events, avoid too many requests for running macros after download and specifically avoid them after remove of packages.
This commit is contained in:
parent
d5f484bf92
commit
04ba7d3040
|
|
@ -379,9 +379,11 @@ MacroController::sync_package_paths ()
|
|||
void
|
||||
MacroController::sync_implicit_macros (bool ask_before_autorun)
|
||||
{
|
||||
// gets the external paths (tech, packages) into m_external_paths
|
||||
sync_macro_sources ();
|
||||
|
||||
if (m_no_implicit_macros) {
|
||||
|
||||
sync_macro_sources ();
|
||||
sync_package_paths ();
|
||||
|
||||
} else {
|
||||
|
|
@ -392,9 +394,6 @@ MacroController::sync_implicit_macros (bool ask_before_autorun)
|
|||
prev_folders_by_path.insert (std::make_pair (p->path, *p));
|
||||
}
|
||||
|
||||
// gets the external paths (tech, packages) into m_external_paths
|
||||
sync_macro_sources ();
|
||||
|
||||
// delete macro collections which are no longer required or update description
|
||||
|
||||
std::vector<lym::MacroCollection *> folders_to_delete;
|
||||
|
|
|
|||
|
|
@ -523,6 +523,9 @@ SaltDownloadManager::execute (lay::SaltManagerDialog *parent, lay::Salt &salt)
|
|||
|
||||
dialog->start ();
|
||||
|
||||
// Stop other events to interfere with the download, specifically not macro controller updates
|
||||
tl::NoDeferredMethods silent_section;
|
||||
|
||||
std::sort (m_registry.begin (), m_registry.end ());
|
||||
|
||||
for (std::vector<Descriptor>::const_iterator p = m_registry.begin (); p != m_registry.end (); ++p) {
|
||||
|
|
|
|||
|
|
@ -1213,13 +1213,13 @@ private:
|
|||
void
|
||||
SaltManagerDialog::get_remote_grain_info (lay::SaltGrain *g, SaltGrainDetailsTextWidget *details)
|
||||
{
|
||||
if (! g) {
|
||||
// NOTE: we don't want to interfere with download here, so refuse to do update
|
||||
// the info while a package is downloaded.
|
||||
if (! g || m_downloaded_grain.get ()) {
|
||||
details->setHtml (QString ());
|
||||
return;
|
||||
}
|
||||
|
||||
tl_assert (m_downloaded_grain.get () == 0);
|
||||
|
||||
m_downloaded_grain.reset (0);
|
||||
|
||||
if (m_downloaded_grain_reader.get ()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue