rpms/kicad/F-13 kicad-2010.05.27.module-edition-issues.patch, NONE, 1.1 kicad.spec, 1.29, 1.30
Alain Portal
dionysos at fedoraproject.org
Tue Jun 15 21:45:42 UTC 2010
Author: dionysos
Update of /cvs/pkgs/rpms/kicad/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13168
Modified Files:
kicad.spec
Added Files:
kicad-2010.05.27.module-edition-issues.patch
Log Message:
* Tue Jun 15 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 2010.05.27-6
- Fix some module edition issues (https://bugs.launchpad.net/kicad/+bug/593546,
https://bugs.launchpad.net/kicad/+bug/593547)
kicad-2010.05.27.module-edition-issues.patch:
include/wxBasePcbFrame.h | 1 -
include/wxPcbStruct.h | 22 ++++++++++++++++++++--
pcbnew/class_module.cpp | 1 +
pcbnew/loadcmp.cpp | 44 +++++++++++++++++++++++++-------------------
pcbnew/modedit.cpp | 19 ++++++++++++++++---
5 files changed, 62 insertions(+), 25 deletions(-)
--- NEW FILE kicad-2010.05.27.module-edition-issues.patch ---
diff -ru kicad-2010.05.27-5.rev2363/include/wxBasePcbFrame.h kicad-2010.05.27-6.rev2363/include/wxBasePcbFrame.h
--- kicad-2010.05.27-5.rev2363/include/wxBasePcbFrame.h 2010-05-28 21:47:34.000000000 +0200
+++ kicad-2010.05.27-6.rev2363/include/wxBasePcbFrame.h 2010-06-15 22:57:22.000000000 +0200
@@ -213,7 +213,6 @@
void Archive_Modules( const wxString& LibName,
bool NewModulesOnly );
- MODULE* Select_1_Module_From_BOARD( BOARD* Pcb );
MODULE* GetModuleByName();
/** Function OnModify()
diff -ru kicad-2010.05.27-5.rev2363/include/wxPcbStruct.h kicad-2010.05.27-6.rev2363/include/wxPcbStruct.h
--- kicad-2010.05.27-5.rev2363/include/wxPcbStruct.h 2010-05-28 21:47:34.000000000 +0200
+++ kicad-2010.05.27-6.rev2363/include/wxPcbStruct.h 2010-06-15 22:59:39.000000000 +0200
@@ -1088,6 +1088,11 @@
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
void Show3D_Frame( wxCommandEvent& event );
void GeneralControle( wxDC* DC, wxPoint Mouse );
+
+ /** function LoadModuleFromBoard
+ * called from the main toolbar
+ * to load a footprint from board mainly to edit it
+ */
void LoadModuleFromBoard( wxCommandEvent& event );
/** Virtual Function OnModify()
@@ -1172,10 +1177,23 @@
void RemoveStruct( EDA_BaseStruct* Item );
void Transform( MODULE* module, int transform );
- // loading Footprint
+ // loading/exporting Footprint
MODULE* Import_Module( wxDC* DC );
void Export_Module( MODULE* ptmod, bool createlib );
- void Load_Module_From_BOARD( MODULE* Module );
+
+ /** function Load_Module_From_BOARD
+ * load in Modedit a footfrint from the main board
+ * @param Module = the module to load. If NULL, a module reference will we asked to user
+ * @return true if a module isloaded, false otherwise.
+ */
+ bool Load_Module_From_BOARD( MODULE* Module );
+
+ /** Function Select_1_Module_From_BOARD
+ * Display the list of modules currently existing on the BOARD
+ * @return a pointer to a module if this module is selected or NULL otherwise
+ * @param aPcb = the board from modules can be loaded
+ */
+ MODULE* Select_1_Module_From_BOARD( BOARD* aPcb );
// functions to edit footprint edges
diff -ru kicad-2010.05.27-5.rev2363/pcbnew/class_module.cpp kicad-2010.05.27-6.rev2363/pcbnew/class_module.cpp
--- kicad-2010.05.27-5.rev2363/pcbnew/class_module.cpp 2010-05-28 21:47:32.000000000 +0200
+++ kicad-2010.05.27-6.rev2363/pcbnew/class_module.cpp 2010-06-15 23:00:21.000000000 +0200
@@ -101,6 +101,7 @@
m_CntRot90 = aModule->m_CntRot90;
m_CntRot180 = aModule->m_CntRot180;
m_LastEdit_Time = aModule->m_LastEdit_Time;
+ m_Link = aModule->m_Link;
m_Path = aModule->m_Path; //is this correct behavior?
m_TimeStamp = GetTimeStamp();
m_LocalSolderMaskMargin = aModule->m_LocalSolderMaskMargin;
diff -ru kicad-2010.05.27-5.rev2363/pcbnew/loadcmp.cpp kicad-2010.05.27-6.rev2363/pcbnew/loadcmp.cpp
--- kicad-2010.05.27-5.rev2363/pcbnew/loadcmp.cpp 2010-05-28 21:47:32.000000000 +0200
+++ kicad-2010.05.27-6.rev2363/pcbnew/loadcmp.cpp 2010-06-15 23:05:34.000000000 +0200
@@ -41,27 +41,30 @@
static ModList* MList;
-
-void WinEDA_ModuleEditFrame::Load_Module_From_BOARD( MODULE* Module )
+/** function Load_Module_From_BOARD
+ * load in Modedit a footfrint from the main board
+ * @param Module = the module to load. If NULL, a module reference will we asked to user
+ * @return true if a module isloaded, false otherwise.
+ */
+bool WinEDA_ModuleEditFrame::Load_Module_From_BOARD( MODULE* Module )
{
MODULE* NewModule;
WinEDA_BasePcbFrame* parent = (WinEDA_BasePcbFrame*) GetParent();
if( Module == NULL )
{
- if( parent->GetBoard() == NULL
- || parent->GetBoard()->m_Modules == NULL )
- return;
+ if( ! parent->GetBoard() || ! parent->GetBoard()->m_Modules )
+ return false;
Module = Select_1_Module_From_BOARD( parent->GetBoard() );
}
if( Module == NULL )
- return;
+ return false;
SetCurItem( NULL );
- Clear_Pcb( TRUE );
+ Clear_Pcb( false );
GetBoard()->m_Status_Pcb = 0;
NewModule = new MODULE( GetBoard() );
@@ -80,9 +83,11 @@
Place_Module( Module, NULL );
if( Module->GetLayer() != LAYER_N_FRONT )
Module->Flip( Module->m_Pos );
- Rotate_Module( NULL, Module, 0, FALSE );
+ Rotate_Module( NULL, Module, 0, false );
GetScreen()->ClrModify();
Zoom_Automatique( TRUE );
+
+ return true;
}
@@ -117,7 +122,7 @@
if( ModuleName[0] == '=' ) // Selection by keywords
{
- AllowWildSeach = FALSE;
+ AllowWildSeach = false;
keys = ModuleName.AfterFirst( '=' );
ModuleName = Select_1_Module_From_List( this, library, wxEmptyString,
keys );
@@ -130,7 +135,7 @@
else if( ( ModuleName.Contains( wxT( "?" ) ) )
|| ( ModuleName.Contains( wxT( "*" ) ) ) ) // Selection wild card
{
- AllowWildSeach = FALSE;
+ AllowWildSeach = false;
ModuleName = Select_1_Module_From_List( this, library, ModuleName,
wxEmptyString );
if( ModuleName.IsEmpty() )
@@ -140,11 +145,11 @@
}
}
- module = Get_Librairie_Module( library, ModuleName, FALSE );
+ module = Get_Librairie_Module( library, ModuleName, false );
if( ( module == NULL ) && AllowWildSeach ) /* Search with wildcard */
{
- AllowWildSeach = FALSE;
+ AllowWildSeach = false;
wxString wildname = wxChar( '*' ) + ModuleName + wxChar( '*' );
ModuleName = wildname;
ModuleName = Select_1_Module_From_List( this, library, ModuleName,
@@ -445,7 +450,7 @@
ListBox->Append( msg );
NbModules++;
}
- else if( WildCompareString( aMask, msg, FALSE ) )
+ else if( WildCompareString( aMask, msg, false ) )
{
ListBox->Append( msg );
NbModules++;
@@ -594,11 +599,12 @@
}
-/* Display the list of modules currently PCB
- * Returns a pointer if module selected
- * Returns NULL otherwise
+/** Function Select_1_Module_From_BOARD
+ * Display the list of modules currently existing on the BOARD
+ * @return a pointer to a module if this module is selected or NULL otherwise
+ * @param aPcb = the board from modules can be loaded
*/
-MODULE* WinEDA_BasePcbFrame::Select_1_Module_From_BOARD( BOARD* Pcb )
+MODULE* WinEDA_ModuleEditFrame::Select_1_Module_From_BOARD( BOARD* aPcb )
{
int ii;
MODULE* Module;
@@ -610,7 +616,7 @@
wxColour( 200, 200, 255 ) );
ii = 0;
- Module = Pcb->m_Modules;
+ Module = aPcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Next() )
{
ii++;
@@ -635,7 +641,7 @@
OldName = CmpName;
- Module = Pcb->m_Modules;
+ Module = aPcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Next() )
{
if( CmpName.CmpNoCase( Module->m_Reference->m_Text ) == 0 )
diff -ru kicad-2010.05.27-5.rev2363/pcbnew/modedit.cpp kicad-2010.05.27-6.rev2363/pcbnew/modedit.cpp
--- kicad-2010.05.27-5.rev2363/pcbnew/modedit.cpp 2010-05-28 21:47:32.000000000 +0200
+++ kicad-2010.05.27-6.rev2363/pcbnew/modedit.cpp 2010-06-15 23:08:06.000000000 +0200
@@ -131,11 +131,23 @@
return item;
}
-
+/** function LoadModuleFromBoard
+ * called from the main toolbar
+ * to load a footprint from board mainly to edit it
+ */
void WinEDA_ModuleEditFrame::LoadModuleFromBoard( wxCommandEvent& event )
{
+ if( GetScreen()->IsModify() )
+ {
+ if( !IsOK( this,
+ _( "Current footprint changes will be lost and this operation cannot be undone. Continue ?" ) ) )
+ return;
+ }
+
+ if( ! Load_Module_From_BOARD( NULL ) )
+ return;
+
GetScreen()->ClearUndoRedoList();
- Load_Module_From_BOARD( NULL );
GetScreen()->ClrModify();
if( m_Draw3DFrame )
@@ -333,9 +345,10 @@
break;
case ID_MODEDIT_IMPORT_PART:
+ if( ! Clear_Pcb( true ) )
+ break; // //this command is aborted
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
- Clear_Pcb( true );
GetScreen()->m_Curseur = wxPoint( 0, 0 );
Import_Module( NULL );
redraw = true;
Index: kicad.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kicad/F-13/kicad.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- kicad.spec 11 Jun 2010 21:48:59 -0000 1.29
+++ kicad.spec 15 Jun 2010 21:45:41 -0000 1.30
@@ -1,6 +1,6 @@
Name: kicad
Version: 2010.05.27
-Release: 5.rev2363%{?dist}
+Release: 6.rev2363%{?dist}
Summary: Electronic schematic diagrams and printed circuit board artwork
Summary(fr): Saisie de schéma électronique et routage de circuit imprimé
@@ -29,6 +29,7 @@ Patch14: %{name}-%{version}.missi
Patch15: %{name}-%{version}.fix-unwanted-mouse-cursor-move.patch
Patch16: %{name}-%{version}.3Dviewer-arcs-draw-issue.patch
Patch17: %{name}-%{version}.search-current-sheet-only.patch
+Patch18: %{name}-%{version}.module-edition-issues.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -189,6 +190,7 @@ Documentation and tutorials for Kicad in
%patch15 -p1 -b .fix-unwanted-mouse-cursor-move
%patch16 -p0 -b .3Dviewer-arcs-draw-issue
%patch17 -p1 -b .search-current-sheet-only
+%patch18 -p1 -b .module-edition-issues
#kicad-doc.noarch: W: file-not-utf8 /usr/share/doc/kicad/AUTHORS.txt
iconv -f iso8859-1 -t utf-8 AUTHORS.txt > AUTHORS.conv && mv -f AUTHORS.conv AUTHORS.txt
@@ -409,10 +411,14 @@ gtk-update-icon-cache %{_datadir}/icons/
%changelog
-* Mon Jun 11 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 2010.05.27-5
+* Tue Jun 15 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 2010.05.27-6
+- Fix some module edition issues (https://bugs.launchpad.net/kicad/+bug/593546,
+ https://bugs.launchpad.net/kicad/+bug/593547)
+
+* Fri Jun 11 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 2010.05.27-5
- Fix a crash in searching string (https://bugs.launchpad.net/kicad/+bug/592566)
-* Mon Jun 8 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 2010.05.27-4
+* Tue Jun 8 2010 Alain Portal <alain.portal[AT]univ-montp2[DOT]fr> 2010.05.27-4
- Fix a focus issue (https://bugs.launchpad.net/kicad/+bug/587970)
- Fix an unwanted mouse cursor move when using the t hotkey in pcbnew
- Fix an issue on arcs draw in 3D viewer (https://bugs.launchpad.net/kicad/+bug/588882)
More information about the scm-commits
mailing list