Pcbnew: Fix a refresh issue when changing active layer (Windows only)
Fix 2 very minor issues.
This commit is contained in:
parent
d53f666486
commit
726d772cfa
|
@ -31,7 +31,7 @@ public:
|
|||
~SELECT_LAYER_DIALOG() { };
|
||||
|
||||
private:
|
||||
void Sel_Layer( wxCommandEvent& event );
|
||||
void OnLayerSelected( wxCommandEvent& event );
|
||||
void OnCancelClick( wxCommandEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
@ -39,9 +39,9 @@ private:
|
|||
|
||||
|
||||
BEGIN_EVENT_TABLE( SELECT_LAYER_DIALOG, wxDialog )
|
||||
EVT_BUTTON( wxID_OK, SELECT_LAYER_DIALOG::Sel_Layer )
|
||||
EVT_BUTTON( wxID_OK, SELECT_LAYER_DIALOG::OnLayerSelected )
|
||||
EVT_BUTTON( wxID_CANCEL, SELECT_LAYER_DIALOG::OnCancelClick )
|
||||
EVT_RADIOBOX( ID_LAYER_SELECT, SELECT_LAYER_DIALOG::Sel_Layer )
|
||||
EVT_RADIOBOX( ID_LAYER_SELECT, SELECT_LAYER_DIALOG::OnLayerSelected )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
@ -163,11 +163,15 @@ SELECT_LAYER_DIALOG::SELECT_LAYER_DIALOG( PCB_BASE_FRAME* parent,
|
|||
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
|
||||
ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
|
||||
|
||||
SetFocus();
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
|
||||
Center();
|
||||
}
|
||||
|
||||
|
||||
void SELECT_LAYER_DIALOG::Sel_Layer( wxCommandEvent& event )
|
||||
void SELECT_LAYER_DIALOG::OnLayerSelected( wxCommandEvent& event )
|
||||
{
|
||||
int ii = m_LayerId[m_LayerList->GetSelection()];
|
||||
|
||||
|
@ -312,11 +316,10 @@ SELECT_LAYERS_PAIR_DIALOG::SELECT_LAYERS_PAIR_DIALOG( PCB_BASE_FRAME* parent ) :
|
|||
|
||||
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
|
||||
ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
|
||||
SetFocus();
|
||||
|
||||
if( GetSizer() )
|
||||
{
|
||||
GetSizer()->SetSizeHints( this );
|
||||
}
|
||||
Center();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
|
|||
int active_layer_color, Route_Layer_TOP_color,
|
||||
Route_Layer_BOTTOM_color, via_color;
|
||||
bool change = false;
|
||||
bool first_call = LayerPairBitmap == NULL;
|
||||
|
||||
static int previous_active_layer_color, previous_Route_Layer_TOP_color,
|
||||
previous_Route_Layer_BOTTOM_color, previous_via_color;
|
||||
|
@ -112,7 +113,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
|
|||
if( !change && (LayerPairBitmap != NULL) )
|
||||
return;
|
||||
|
||||
/* Create the bitmap too and its Memory DC, if not already made */
|
||||
/* Create the bitmap and its Memory DC, if not already made */
|
||||
if( LayerPairBitmap == NULL )
|
||||
{
|
||||
LayerPairBitmap = new wxBitmap( 24, 24 );
|
||||
|
@ -164,10 +165,10 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
|
|||
* in order to delete the MemoryDC safely without deleting the bitmap */
|
||||
iconDC.SelectObject( wxNullBitmap );
|
||||
|
||||
if( m_HToolBar )
|
||||
if( m_HToolBar && ! first_call )
|
||||
{
|
||||
m_HToolBar->SetToolBitmap( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap );
|
||||
m_HToolBar->Realize();
|
||||
m_HToolBar->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,86 +1,10 @@
|
|||
update=20/11/2008-19:07:03
|
||||
update=19/09/2011 08:20:40
|
||||
version=1
|
||||
last_client=eeschema
|
||||
last_client=pcbnew
|
||||
[general]
|
||||
version=1
|
||||
RootSch=
|
||||
BoardNm=
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetITyp=0
|
||||
NetIExt=.net
|
||||
PkgIExt=.pkg
|
||||
NetDir=
|
||||
LibDir=
|
||||
NetType=0
|
||||
[cvpcb/libraries]
|
||||
EquName1=devcms
|
||||
[pcbnew]
|
||||
version=1
|
||||
PadDrlX=320
|
||||
PadDimH=600
|
||||
PadDimV=600
|
||||
PadForm=1
|
||||
PadMask=14745599
|
||||
ViaDiam=450
|
||||
ViaDril=250
|
||||
Isol=60
|
||||
Countlayer=2
|
||||
Lpiste=170
|
||||
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=800
|
||||
TxtPcbH=600
|
||||
TxtModV=600
|
||||
TxtModH=600
|
||||
TxtModW=120
|
||||
HPGLnum=1
|
||||
HPGdiam=15
|
||||
HPGLSpd=20
|
||||
HPGLrec=2
|
||||
HPGLorg=0
|
||||
GERBmin=15
|
||||
VEgarde=100
|
||||
DrawLar=150
|
||||
EdgeLar=150
|
||||
TxtLar=120
|
||||
MSegLar=150
|
||||
ForPlot=1
|
||||
WpenSer=10
|
||||
UserGrX=0,01
|
||||
UserGrY=0,01
|
||||
UserGrU=1
|
||||
DivGrPc=1
|
||||
TimeOut=600
|
||||
MaxLnkS=3
|
||||
ShowRat=0
|
||||
ShowMRa=1
|
||||
[pcbnew/libraries]
|
||||
LibDir=
|
||||
LibName1=sockets
|
||||
LibName2=connect
|
||||
LibName3=discret
|
||||
LibName4=pin_array
|
||||
LibName5=divers
|
||||
LibName6=libcms
|
||||
LibName7=display
|
||||
LibName8=valves
|
||||
LibName9=led
|
||||
LibName10=dip_sockets
|
||||
[eeschema]
|
||||
version=1
|
||||
LibDir=
|
||||
|
@ -111,8 +35,6 @@ offY_E=0
|
|||
RptD_X=0
|
||||
RptD_Y=100
|
||||
RptLab=1
|
||||
SimCmd=
|
||||
UseNetN=0
|
||||
LabSize=60
|
||||
[eeschema/libraries]
|
||||
LibName1=power
|
||||
|
@ -145,3 +67,38 @@ LibName27=opto
|
|||
LibName28=atmel
|
||||
LibName29=contrib
|
||||
LibName30=valves
|
||||
[cvpcb]
|
||||
version=1
|
||||
NetIExt=net
|
||||
[cvpcb/libraries]
|
||||
EquName1=devcms
|
||||
[pcbnew]
|
||||
version=1
|
||||
PadDrlX=320
|
||||
PadDimH=600
|
||||
PadDimV=600
|
||||
BoardThickness=630
|
||||
TxtPcbV=800
|
||||
TxtPcbH=600
|
||||
TxtModV=600
|
||||
TxtModH=600
|
||||
TxtModW=120
|
||||
VEgarde=100
|
||||
DrawLar=150
|
||||
EdgeLar=150
|
||||
TxtLar=120
|
||||
MSegLar=150
|
||||
LastNetListRead=
|
||||
[pcbnew/libraries]
|
||||
LibDir=
|
||||
LibName1=sockets
|
||||
LibName2=connect
|
||||
LibName3=discret
|
||||
LibName4=pin_array
|
||||
LibName5=divers
|
||||
LibName6=libcms
|
||||
LibName7=display
|
||||
LibName8=led
|
||||
LibName9=dip_sockets
|
||||
LibName10=pga_sockets
|
||||
LibName11=valves
|
||||
|
|
Loading…
Reference in New Issue