From fc2229dfca9a8e166e19aaa09e91b58880886b13 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 6 Oct 2014 20:13:11 +0200 Subject: [PATCH] Eeschema: fix Bug #1376669 (graphics lost in aliased components) Cleaning 3 svg files (no icon change) Very minor other changes. --- 3d-viewer/3d_canvas.cpp | 29 - 3d-viewer/3d_draw_helper_functions.cpp | 29 + bitmaps_png/sources/cvpcb.svg | 308 +-------- bitmaps_png/sources/find_replace.svg | 94 +-- bitmaps_png/sources/orient.svg | 606 ++++++++++++++---- eeschema/getpart.cpp | 3 + .../plugins/FPC_(SMD_type)_footprintwizard.py | 27 +- 7 files changed, 548 insertions(+), 548 deletions(-) diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index aea2dedf1d..f59e631224 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -52,35 +52,6 @@ #include #include -// ----------------- -// helper function (from wxWidgets, opengl/cube.cpp sample -// ----------------- -void CheckGLError(const char *aFileName, int aLineNumber) -{ - GLenum errLast = GL_NO_ERROR; - - for ( ; ; ) - { - GLenum err = glGetError(); - if ( err == GL_NO_ERROR ) - return; - - // normally the error is reset by the call to glGetError() but if - // glGetError() itself returns an error, we risk looping forever here - // so check that we get a different error than the last time - if ( err == errLast ) - { - wxLogError(wxT("OpenGL error state couldn't be reset.")); - return; - } - - errLast = err; - - wxLogError( wxT( "OpenGL error %d At: %s, line: %d" ), err, - GetChars( FROM_UTF8( aFileName ) ), aLineNumber ); - } -} - /* * EDA_3D_CANVAS implementation diff --git a/3d-viewer/3d_draw_helper_functions.cpp b/3d-viewer/3d_draw_helper_functions.cpp index d6050910f8..b3c08aa86f 100644 --- a/3d-viewer/3d_draw_helper_functions.cpp +++ b/3d-viewer/3d_draw_helper_functions.cpp @@ -42,6 +42,35 @@ #define TEXTURE_PCB_SCALE 5.0 +// ----------------- +// helper function (from wxWidgets, opengl/cube.cpp sample +// ----------------- +void CheckGLError(const char *aFileName, int aLineNumber) +{ + GLenum errLast = GL_NO_ERROR; + + for ( ; ; ) + { + GLenum err = glGetError(); + if ( err == GL_NO_ERROR ) + return; + + // normally the error is reset by the call to glGetError() but if + // glGetError() itself returns an error, we risk looping forever here + // so check that we get a different error than the last time + if ( err == errLast ) + { + wxLogError(wxT("OpenGL error state couldn't be reset.")); + return; + } + + errLast = err; + + wxLogError( wxT( "OpenGL error %d At: %s, line: %d" ), err, + GetChars( FROM_UTF8( aFileName ) ), aLineNumber ); + } +} + INFO3D_VISU& EDA_3D_CANVAS::GetPrm3DVisu() const { diff --git a/bitmaps_png/sources/cvpcb.svg b/bitmaps_png/sources/cvpcb.svg index 9ecdf35b70..4a3136d509 100644 --- a/bitmaps_png/sources/cvpcb.svg +++ b/bitmaps_png/sources/cvpcb.svg @@ -12,8 +12,8 @@ width="26" version="1.1" id="svg2985" - inkscape:version="0.48.3.1 r9886" - sodipodi:docname="2-icon_cvpcb.svg"> + inkscape:version="0.48.4 r9939" + sodipodi:docname="cvpcb.svg"> @@ -35,15 +35,15 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="1600" - inkscape:window-height="849" + inkscape:window-width="1920" + inkscape:window-height="1033" id="namedview3055" showgrid="true" - inkscape:zoom="18.178537" - inkscape:cx="5.5742284" - inkscape:cy="8.1742878" - inkscape:window-x="0" - inkscape:window-y="29" + inkscape:zoom="31.120863" + inkscape:cx="13.368694" + inkscape:cy="12.38952" + inkscape:window-x="-4" + inkscape:window-y="-4" inkscape:window-maximized="1" inkscape:current-layer="svg2985" inkscape:snap-to-guides="false" @@ -327,95 +327,6 @@ cy="7.2679" r="38.159" /> - - - - - - - - - - - - - - - - - - - - - @@ -564,161 +429,6 @@ inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bitmaps_png/sources/find_replace.svg b/bitmaps_png/sources/find_replace.svg index e1ec4e7bf0..4060f07f72 100644 --- a/bitmaps_png/sources/find_replace.svg +++ b/bitmaps_png/sources/find_replace.svg @@ -14,7 +14,7 @@ inkscape:export-xdpi="90.000000" inkscape:export-filename="/home/steven/edit-find-48.png" sodipodi:docname="find_replace.svg" - inkscape:version="0.48.2 r9819" + inkscape:version="0.48.4 r9939" sodipodi:version="0.32" id="svg249" height="26" @@ -433,17 +433,17 @@ image/svg+xml - + edit @@ -704,82 +704,6 @@ inkscape:label="Magnifying Glass" style="display:inline" transform="translate(0,-22)"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 15b321f283..7beaf1baef 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -208,6 +208,9 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC, // alias exists because its root component was found component->SetPartName( name ); + // Be sure the link to the corresponding LIB_PART is OK: + component->Resolve( Prj().SchLibs() ); + // Set the component value that can differ from component name in lib, for aliases component->GetField( VALUE )->SetText( name ); diff --git a/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py b/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py index 2c2cb4fdc5..c93eb8f9ef 100644 --- a/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py +++ b/pcbnew/scripting/plugins/FPC_(SMD_type)_footprintwizard.py @@ -131,15 +131,13 @@ class FPCFootprintWizard(FootprintWizardPlugin): module.Add(outline) # lower line - outline1 = EDGE_MODULE(module) - outline1.Copy(outline) #copy all settings from outline + outline1 = outline.Duplicate() #copy all settings from outline posy = pad_height/2 + linewidth/2 + margin outline1.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, posy)) module.Add(outline1) # around left mechanical pad (the outline around right pad is mirrored/y axix) - outline2 = EDGE_MODULE(module) # vertical segment - outline2.Copy(outline) + outline2 = outline.Duplicate() # vertical segment yend = pad_s0_pos.y + shl_height/2 + margin outline2.SetStartEnd(wxPoint(xstart, posy), wxPoint( xstart, yend)) module.Add(outline2) @@ -148,8 +146,7 @@ class FPCFootprintWizard(FootprintWizardPlugin): outline2_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xstart, yend)) module.Add(outline2_d) - outline3 = EDGE_MODULE(module) # horizontal segment below the pad - outline3.Copy(outline) + outline3 = outline.Duplicate() # horizontal segment below the pad posy = yend xend = pad_s0_pos.x - (shl_width/2 + linewidth + margin*2) outline3.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, posy)) @@ -159,37 +156,31 @@ class FPCFootprintWizard(FootprintWizardPlugin): outline3_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) module.Add(outline3_d) - outline4 = EDGE_MODULE(module) # vertical segment at left of the pad - outline4.Copy(outline) + outline4 = outline.Duplicate() # vertical segment at left of the pad xstart = xend yend = posy - (shl_height + linewidth + margin*2) outline4.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, yend)) module.Add(outline4) - outline4_d = EDGE_MODULE(module) # right pad side - outline4_d.Copy(outline4) + outline4_d = outline.Duplicate() # right pad side outline4_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) module.Add(outline4_d) - outline5 = EDGE_MODULE(module) # horizontal segment above the pad - outline5.Copy(outline) + outline5 = outline.Duplicate() # horizontal segment above the pad xstart = xend xend = - pad_pitch*0.5-offsetX posy = yend outline5.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, yend)) module.Add(outline5) - outline5_d = EDGE_MODULE(module) # right pad side - outline5_d.Copy(outline5) + outline5_d = outline.Duplicate() # right pad side outline5_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) module.Add(outline5_d) - outline6 = EDGE_MODULE(module) # vertical segment above the pad - outline6.Copy(outline) + outline6 = outline.Duplicate() # vertical segment above the pad xstart = xend yend = -pad_height/2 - linewidth/2 - margin outline6.SetStartEnd(wxPoint(xstart, posy), wxPoint( xend, yend)) module.Add(outline6) - outline6_d = EDGE_MODULE(module) # right pad side - outline6_d.Copy(outline6) + outline6_d = outline.Duplicate() # right pad side outline6_d.SetStartEnd(wxPoint(-xstart, posy), wxPoint( -xend, yend)) module.Add(outline6_d)