Hi, Attached is a patch to fix a few annoyances people have been having with project_rescue. I know it's not a "true" bug fix in that nothing is crashing or eating data, but the whole idea of project_rescue is to be easy for newbies who don't understand why their old projects don't load under the new release, and I'd like to get this fixed up and ready to go before the release...
- Slightly change the info text in the dialog. Add a definition of exactly what it means to "rescue" a component, and add a line break that makes it more readable. - Reload the project libraries when a project is opened, even if kicad is already running and the same project is open. I've heard confusion a couple times now about the fact that if you cancel rescue, save and reopen, it shows up again (because even though eeschema writes out the -cache.lib, it's not reloaded). - Set the Modified flag on cancel, because a change has indeed been made (choosing not to rescue is equivalent to updating the components). "Save" seems to be the first place people go after pressing cancel, and they're confused that it's greyed out. Thanks. -- Chris
commit faada345467f40e1b5b35b73b6112cc6849eb838 Author: Chris Pavlina <[email protected]> Date: Sat Jun 27 11:52:47 2015 -0400 Rescue improvements diff --git a/eeschema/dialogs/dialog_rescue_each.cpp b/eeschema/dialogs/dialog_rescue_each.cpp index 69fc5ec..ac804ba 100644 --- a/eeschema/dialogs/dialog_rescue_each.cpp +++ b/eeschema/dialogs/dialog_rescue_each.cpp @@ -84,8 +84,9 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( SCH_EDIT_FRAME* aParent, RESCUER& aRescu wxString info_message = _( "It looks like this project was made using older schematic component libraries.\n" "Some parts may need to be relinked to a different symbol name, and some symbols\n" - "may need to be \"rescued\" into a new library.\n" - "The following changes are recommended to update the project.\n" ); + "may need to be \"rescued\" (cloned and renamed) into a new library.\n" + "\n" + "The following changes are recommended to update the project." ); m_lblInfo->SetLabel( info_message ); } diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 3bf97b9..c09ab2d 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -285,6 +285,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in // event handler in there. // And when a schematic file is loaded, we need these libs to initialize // some parameters (links to PART LIB, dangling ends ...) + Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL ); Prj().SchLibs(); if( is_new ) diff --git a/eeschema/project_rescue.cpp b/eeschema/project_rescue.cpp index 5645787..ce07852 100644 --- a/eeschema/project_rescue.cpp +++ b/eeschema/project_rescue.cpp @@ -330,7 +330,7 @@ public: wxString part_name( each_component->GetPartName() ); LIB_PART* cache_match = find_component( part_name, aRescuer.GetLibs(), /* aCached */ true ); - LIB_PART* lib_match = find_component( part_name, aRescuer.GetLibs(), /* aCached */ false ); + LIB_PART* lib_match = aRescuer.GetLibs()->FindLibPart( part_name ); // Test whether there is a conflict if( !cache_match || !lib_match ) @@ -514,6 +514,10 @@ bool SCH_EDIT_FRAME::RescueProject( bool aRunningOnDemand ) { wxMessageDialog dlg( this, _( "No symbols were rescued." ) ); dlg.ShowModal(); + + // Set the modified flag even on Cancel. Many users seem to instinctively want to Save at + // this point, due to the reloading of the symbols, so we'll make the save button active. + OnModify(); return true; }
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

