Re: [Kicad-developers] [PATCH] Quick rescue fixes

2015-06-26 Thread Wayne Stambaugh
Committed in product branch r5824.  Thanks.

On 6/25/2015 8:30 PM, Chris Pavlina wrote:
 Here are a couple quick fixes to project_rescue.
 
 - Components with multiple converts were rendered with all of them 
   overlapping instead of just one.
 - Schematics missing a -cache.lib resulted in unnecessary renaming 
   suggestions.
 - The dialog title Conflicts Checking is inaccurate now (as we're 
   checking for more than just conflicts) and also somewhat awkward, 
   unidiomatic GUI English; I renamed it to Project Rescue Helper.
 
 --
 Chris
 
 
 
 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp
 


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH] Quick rescue fixes

2015-06-25 Thread Chris Pavlina
Here are a couple quick fixes to project_rescue.

- Components with multiple converts were rendered with all of them 
  overlapping instead of just one.
- Schematics missing a -cache.lib resulted in unnecessary renaming 
  suggestions.
- The dialog title Conflicts Checking is inaccurate now (as we're 
  checking for more than just conflicts) and also somewhat awkward, 
  unidiomatic GUI English; I renamed it to Project Rescue Helper.

--
Chris
commit b4359ade0ab17ca967338cc30b7994208481ddc9
Author: Chris Pavlina cpavl...@binghamton.edu
Date:   Thu Jun 25 20:26:10 2015 -0400

Rescue fixes

diff --git a/eeschema/dialogs/dialog_rescue_each.cpp b/eeschema/dialogs/dialog_rescue_each.cpp
index 31c424a..69fc5ec 100644
--- a/eeschema/dialogs/dialog_rescue_each.cpp
+++ b/eeschema/dialogs/dialog_rescue_each.cpp
@@ -219,7 +219,7 @@ void DIALOG_RESCUE_EACH::renderPreview( LIB_PART* aComponent, int aUnit, wxPanel
 dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
 
 // Find joint bounding box for everything we are about to draw.
-EDA_RECT bBox = aComponent-GetBoundingBox( aUnit, /* deMorganConvert */ 0 );
+EDA_RECT bBox = aComponent-GetBoundingBox( aUnit, /* deMorganConvert */ 1 );
 const double xscale = (double) dc_size.x / bBox.GetWidth();
 const double yscale = (double) dc_size.y / bBox.GetHeight();
 const double scale  = std::min( xscale, yscale ) * 0.85;
@@ -235,7 +235,7 @@ void DIALOG_RESCUE_EACH::renderPreview( LIB_PART* aComponent, int aUnit, wxPanel
 if( !width || !height )
 return;
 
-aComponent-Draw( NULL, dc, offset, aUnit, /* deMorganConvert */ 0, GR_COPY,
+aComponent-Draw( NULL, dc, offset, aUnit, /* deMorganConvert */ 1, GR_COPY,
   UNSPECIFIED_COLOR, DefaultTransform, true, true, false );
 }
 
diff --git a/eeschema/dialogs/dialog_rescue_each_base.fbp b/eeschema/dialogs/dialog_rescue_each_base.fbp
index fcc7882..5199216 100644
--- a/eeschema/dialogs/dialog_rescue_each_base.fbp
+++ b/eeschema/dialogs/dialog_rescue_each_base.fbp
@@ -47,7 +47,7 @@
 property name=size529,593/property
 property name=stylewxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER/property
 property name=subclassDIALOG_SHIM; dialog_shim.h/property
-property name=titleConflicts Checking/property
+property name=titleProject Rescue Helper/property
 property name=tooltip/property
 property name=window_extra_style/property
 property name=window_name/property
diff --git a/eeschema/dialogs/dialog_rescue_each_base.h b/eeschema/dialogs/dialog_rescue_each_base.h
index e6490c3..40d1b11 100644
--- a/eeschema/dialogs/dialog_rescue_each_base.h
+++ b/eeschema/dialogs/dialog_rescue_each_base.h
@@ -62,7 +62,7 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM
 	
 	public:
 		
-		DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString title = _(Conflicts Checking), const wxPoint pos = wxDefaultPosition, const wxSize size = wxSize( 529,593 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString title = _(Project Rescue Helper), const wxPoint pos = wxDefaultPosition, const wxSize size = wxSize( 529,593 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
 		~DIALOG_RESCUE_EACH_BASE();
 	
 };
diff --git a/eeschema/project_rescue.cpp b/eeschema/project_rescue.cpp
index 9104372..5645787 100644
--- a/eeschema/project_rescue.cpp
+++ b/eeschema/project_rescue.cpp
@@ -243,7 +243,7 @@ public:
 {
 wxString part_name( each_component-GetPartName() );
 
-LIB_PART* case_sensitive_match = find_component( part_name, aRescuer.GetLibs(), /* aCached */ true );
+LIB_ALIAS* case_sensitive_match = aRescuer.GetLibs()-FindLibraryEntry( part_name );
 std::vectorLIB_ALIAS* case_insensitive_matches;
 aRescuer.GetLibs()-FindLibraryNearEntries( case_insensitive_matches, part_name );
 
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp