Fixed a minor bug in footprint editor dialog when changing module orientation or side
This commit is contained in:
commit
97ede2a63f
File diff suppressed because it is too large
Load Diff
41858
demos/video/video.brd
41858
demos/video/video.brd
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
update=19/11/2006-14:07:12
|
||||
update=01/05/2010 14:42:54
|
||||
version=1
|
||||
last_client=eeschema
|
||||
last_client=pcbnew
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetITyp=0
|
||||
|
@ -15,78 +15,6 @@ EquName1=devcms
|
|||
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=
|
||||
|
@ -135,3 +63,29 @@ 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 )
|
||||
|
|
Loading…
Reference in New Issue