Fix Bug #1536427 ("User (Custom)" size selection in"Page Settings" issue in non English languages).

Remove also a no more in use code
This commit is contained in:
jean-pierre charras 2016-01-21 11:15:13 +01:00
parent 4c1d9af0a4
commit 731a87db25
3 changed files with 20 additions and 46 deletions

View File

@ -89,36 +89,6 @@ const PAGE_INFO PAGE_INFO::pageUSLedger( wxSize( 17000, 11000 ), wxT( "USLedge
int PAGE_INFO::s_user_width = 17000;
int PAGE_INFO::s_user_height = 11000;
/*
wxArrayString PAGE_INFO::GetStandardSizes()
{
wxArrayString ret;
static const PAGE_INFO* stdPageSizes[] = {
&pageA4,
&pageA3,
&pageA2,
&pageA1,
&pageA0,
&pageA,
&pageB,
&pageC,
&pageD,
&pageE,
// &pageGERBER, // standard?
&pageUSLetter,
&pageUSLegal,
&pageUSLedger,
&pageUser,
};
for( unsigned i=0; i < DIM( stdPageSizes ); ++i )
ret.Add( stdPageSizes[i]->GetType() );
return ret;
}
*/
inline void PAGE_INFO::updatePortrait()
{

View File

@ -52,26 +52,29 @@
// List of page formats.
// should be statically initialized, because we need both
// the translated and the not translated version.
// they are prefixed by "_HKI" (already in use for hotkeys) instead of "_",
// because we need both the translated and the not translated version.
// when displayed in dialog we should explicitely call wxGetTranslation()
// to show the translated version.
// See hotkeys_basic.h for more info
#define _HKI( x ) wxT( x )
static const wxString pageFmts[] =
{
_("A4 210x297mm"),
_("A3 297x420mm"),
_("A2 420x594mm"),
_("A1 594x841mm"),
_("A0 841x1189mm"),
_("A 8.5x11in"),
_("B 11x17in"),
_("C 17x22in"),
_("D 22x34in"),
_("E 34x44in"),
_("USLetter 8.5x11in"), // USLetter without space is correct
_("USLegal 8.5x14in"), // USLegal without space is correct
_("USLedger 11x17in"), // USLedger without space is correct
_("User (Custom)"),
_HKI("A4 210x297mm"),
_HKI("A3 297x420mm"),
_HKI("A2 420x594mm"),
_HKI("A1 594x841mm"),
_HKI("A0 841x1189mm"),
_HKI("A 8.5x11in"),
_HKI("B 11x17in"),
_HKI("C 17x22in"),
_HKI("D 22x34in"),
_HKI("E 34x44in"),
_HKI("USLetter 8.5x11in"), // USLetter without space is correct
_HKI("USLegal 8.5x14in"), // USLegal without space is correct
_HKI("USLedger 11x17in"), // USLedger without space is correct
_HKI("User (Custom)"), // size defined by user. The string must contain "Custom"
// to be reconized in code
};
void EDA_DRAW_FRAME::Process_PageSettings( wxCommandEvent& event )

View File

@ -130,6 +130,7 @@ void GERBER_LAYER_WIDGET::ReFillRender()
void GERBER_LAYER_WIDGET::installRightLayerClickHandler()
{
int rowCount = GetLayerRowCount();
for( int row=0; row<rowCount; ++row )
{
for( int col=0; col<LYR_COLUMN_COUNT; ++col )