kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28305
Re: SCH_LEGACY_PLUGIN buffering
-
To:
<kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Sumiński <maciej.suminski@xxxxxxx>
-
Date:
Tue, 28 Feb 2017 11:07:51 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.46) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
In-reply-to:
<4307c97d-8c36-35e6-1460-578f91d1d3fd@cern.ch>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
One more patch to make the change complete.
On 02/28/2017 10:37 AM, Maciej Sumiński wrote:
> Hi Wayne,
>
> Would you have a look at the attached patches? I do not want to
> introduce changes to the schematic plugins code without your approval.
>
> The first one removes multiple chunks of code that regenerate properties
> basing on the PART_LIB field values. Instead, a PROPERTIES object is
> maintained, so it is always ready whenever needed.
>
> Regarding the second patch: I am looking for a way to store temporary
> changes to libraries. Libraries are linked to files, and now the binding
> is even stronger, as files are reloaded upon a change [1].
>
> It means that once I save only a part of modifications to a library, my
> buffer will be reloaded and the remaining unsaved changes will be gone.
> Do you think it is reasonable to disable cache updating when buffering
> is enabled?
>
> Regards,
> Orson
>
> 1. https://git.launchpad.net/kicad/tree/eeschema/sch_legacy_plugin.cpp#n3359
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
From e1a9428487d94c7829d90fcd3ffe7d8d34f01967 Mon Sep 17 00:00:00 2001
From: Maciej Suminski <maciej.suminski@xxxxxxx>
Date: Tue, 28 Feb 2017 11:06:04 +0100
Subject: [PATCH 3/3] Added missing PROPERTIES parameter to function calls in
PART_LIB
---
eeschema/class_library.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp
index 7d933d9dc..22b4a6fbe 100644
--- a/eeschema/class_library.cpp
+++ b/eeschema/class_library.cpp
@@ -148,7 +148,7 @@ void PART_LIB::EnableBuffering( bool aEnable )
void PART_LIB::GetAliasNames( wxArrayString& aNames )
{
- m_plugin->EnumerateSymbolLib( aNames, fileName.GetFullPath() );
+ m_plugin->EnumerateSymbolLib( aNames, fileName.GetFullPath(), m_properties.get() );
aNames.Sort();
}
@@ -156,7 +156,7 @@ void PART_LIB::GetAliasNames( wxArrayString& aNames )
void PART_LIB::GetAliases( std::vector<LIB_ALIAS*>& aAliases )
{
- m_plugin->EnumerateSymbolLib( aAliases, fileName.GetFullPath() );
+ m_plugin->EnumerateSymbolLib( aAliases, fileName.GetFullPath(), m_properties.get() );
std::sort( aAliases.begin(), aAliases.end(),
[](LIB_ALIAS *lhs, LIB_ALIAS *rhs) -> bool
@@ -172,7 +172,7 @@ void PART_LIB::GetEntryTypePowerNames( wxArrayString& aNames )
for( size_t i = 0; i < aliases.GetCount(); i++ )
{
- LIB_ALIAS* alias = m_plugin->LoadSymbol( fileName.GetFullPath(), aliases[i] );
+ LIB_ALIAS* alias = m_plugin->LoadSymbol( fileName.GetFullPath(), aliases[i], m_properties.get() );
wxCHECK2_MSG( alias != NULL, continue,
wxString::Format( "alias '%s' not found in symbol library '%s'",
@@ -212,11 +212,11 @@ bool PART_LIB::HasPowerParts()
// return true if at least one power part is found in lib
wxArrayString aliases;
- m_plugin->EnumerateSymbolLib( aliases, fileName.GetFullPath() );
+ m_plugin->EnumerateSymbolLib( aliases, fileName.GetFullPath(), m_properties.get() );
for( size_t i = 0; i < aliases.GetCount(); i++ )
{
- LIB_ALIAS* alias = m_plugin->LoadSymbol( fileName.GetFullPath(), aliases[i] );
+ LIB_ALIAS* alias = m_plugin->LoadSymbol( fileName.GetFullPath(), aliases[i], m_properties.get() );
wxCHECK2_MSG( alias != NULL, continue,
wxString::Format( "alias '%s' not found in symbol library '%s'",
--
2.11.0
Attachment:
signature.asc
Description: OpenPGP digital signature
References