Commit ec684950 authored by jp's avatar jp

Fixed a minor bug in footprint editor dialog when changing module orientation or side

parent 8f90556a
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
update=19/11/2006-14:07:12
version=1
last_client=eeschema
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetDir=
LibDir=
NetType=0
[cvpcb/libraries]
EquName1=devcms
[general]
version=1
RootSch=video.sch
BoardNm=video.brd
[pcbnew]
version=1
LibDir=
Sel_Mod=1
NetType=0
PadDril=320
PadDimH=550
PadDimV=550
PadOfDH=0
PadOfDV=0
PadForm=1
PadMask=14745599
PadAttr=0
PadOrie=0
ViaDiam=450
ViaDril=250
Isol=80
Mlayer=536838151
Lpiste=80
RouteTo=15
RouteBo=0
TypeVia=3
Segm45=1
Racc45=1
Unite=0
SegFill=1
SegAffG=0
NewAffG=1
PadFill=1
PadAffG=1
PadSNum=1
ModAffC=0
ModAffT=0
PcbAffT=0
SgPcb45=1
TxtPcbV=600
TxtPcbH=600
GridX=50
GridY=50
TxtModV=500
TxtModH=500
TxtModW=80
HPGLnum=1
Pltmarg=300
HPGdiam=15
HPGLSpd=20
HPGLrec=2
HPGLorg=0
GERBmin=15
GERBfmt=1
VEgarde=100
DrawLar=120
EdgeLar=120
TxtLar=80
MSegLar=120
ForPlot=1
WpenSer=10
UserGrX=500
UserGrY=500
UserGrU=1
DivGrPc=1
TimeOut=600
MaxLnkS=3
ShowRat=0
ShowMRa=0
[pcbnew/libraries]
LibName1=supports
LibName2=connect
LibName3=discret
LibName4=pin_array
LibName5=divers
LibName6=libcms
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
PenMin=20
SimCmd=
UseNetN=0
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=conn
LibName4=brooktre
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=analog_switches
LibName14=philips
update=01/05/2010 14:42:54
version=1
last_client=pcbnew
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetDir=
LibDir=
NetType=0
[cvpcb/libraries]
EquName1=devcms
[general]
version=1
RootSch=video.sch
BoardNm=video.brd
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
PenMin=20
SimCmd=
UseNetN=0
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=conn
LibName4=brooktre
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=analog_switches
LibName14=philips
[pcbnew]
version=1
PadDrlX=1200
PadDimH=1500
PadDimV=2000
BoardThickness=630
SgPcb45=1
TxtPcbV=600
TxtPcbH=600
TxtModV=500
TxtModH=500
TxtModW=80
VEgarde=100
DrawLar=120
EdgeLar=120
TxtLar=80
MSegLar=120
LastNetListRead=
[pcbnew/libraries]
LibDir=
LibName1=supports
LibName2=connect
LibName3=discret
LibName4=pin_array
LibName5=divers
LibName6=libcms
......@@ -183,7 +183,6 @@ void DIALOG_MODULE_BOARD_EDITOR::ModuleOrientEvent( wxCommandEvent& event )
break;
default:
m_OrientValue->Enable( FALSE );
m_OrientValue->Enable( TRUE );
break;
}
......@@ -436,7 +435,6 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event )
void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
{
bool change_layer = FALSE;
wxPoint modpos;
wxString msg;
......@@ -476,25 +474,6 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
modpos.y = ReturnValueFromTextCtrl( *m_ModPositionY, PCB_INTERNAL_UNIT );
m_CurrentModule->SetPosition( modpos );
// Set orientation
long orient = 0;
msg = m_OrientValue->GetValue();
msg.ToLong( &orient );
if( m_CurrentModule->m_Orient != orient )
m_CurrentModule->Rotate( m_CurrentModule->m_Pos,
orient - m_CurrentModule->m_Orient );
if( m_LayerCtrl->GetSelection() == 0 ) // layer req = COMPONENT
{
if( m_CurrentModule->GetLayer() == LAYER_N_BACK )
change_layer = TRUE;
}
else if( m_CurrentModule->GetLayer() == LAYER_N_FRONT )
change_layer = TRUE;
if( change_layer )
m_CurrentModule->Flip( m_CurrentModule->m_Pos );
if( m_AutoPlaceCtrl->GetSelection() == 1 )
m_CurrentModule->m_ModuleStatus |= MODULE_is_LOCKED;
else
......@@ -522,6 +501,30 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
m_CurrentModule->m_Reference->Copy( m_ReferenceCopy );
m_CurrentModule->m_Value->Copy( m_ValueCopy );
/* Now, set orientation. must be made after others changes,
* because rotation changes fields positions on board according to the new orientation
* (relative positions are not modified)
*/
long orient = 0;
msg = m_OrientValue->GetValue();
msg.ToLong( &orient );
if( m_CurrentModule->m_Orient != orient )
m_CurrentModule->Rotate( m_CurrentModule->m_Pos,
orient - m_CurrentModule->m_Orient );
// Set component side, that also have effect on the fields positions on board
bool change_layer = FALSE;
if( m_LayerCtrl->GetSelection() == 0 ) // layer req = COMPONENT
{
if( m_CurrentModule->GetLayer() == LAYER_N_BACK )
change_layer = TRUE;
}
else if( m_CurrentModule->GetLayer() == LAYER_N_FRONT )
change_layer = TRUE;
if( change_layer )
m_CurrentModule->Flip( m_CurrentModule->m_Pos );
/* Update 3D shape list */
int ii = m_3D_ShapeNameListBox->GetSelection();
if( ii >= 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment