← Back to team overview

kicad-developers team mailing list archive

[PATCH] Ammendment for bug fixes #1101718 and #1102381

 

Hi,

though the fixes for #1101718 and #1102381 have already been committed,
I wasn't really satisfied with their solution. Find attached a cleaner
patch for both issues, more consistent with the existing code.

Best regards,
-- 
Jacobo Aragunde
Software Engineer at Igalia
=== modified file 'eeschema/libarch.cpp'
--- eeschema/libarch.cpp	2013-01-21 19:58:02 +0000
+++ eeschema/libarch.cpp	2013-01-30 16:35:12 +0000
@@ -46,10 +46,7 @@
 
 bool SCH_EDIT_FRAME::CreateArchiveLibraryCacheFile()
 {
-    wxFileName fn;
-    SCH_SCREENS ScreenList;
-
-    fn = ScreenList.GetFirst()->GetFileName();
+    wxFileName fn = GetScreen()->GetFileName();
     fn.SetName( fn.GetName() + wxT( "-cache" ) );
     fn.SetExt( SchematicLibraryFileExtension );
 

=== modified file 'eeschema/schframe.cpp'
--- eeschema/schframe.cpp	2013-01-24 17:46:37 +0000
+++ eeschema/schframe.cpp	2013-01-30 16:35:22 +0000
@@ -514,8 +514,7 @@
 
 wxString SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet()
 {
-    SCH_SCREENS ScreenList;
-    wxFileName fn = ScreenList.GetFirst()->GetFileName();
+    wxFileName fn = GetScreen()->GetFileName();
 
 #ifndef KICAD_GOST
     wxString filename = fn.GetName();