Loading common/title_block_shapes.h +196 −295 File changed.Preview size limit exceeded, changes collapsed. Show changes common/title_block_shapes_gost.h +12 −15 Original line number Diff line number Diff line Loading @@ -35,8 +35,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #define SIZETEXT 100 // worksheet text size #define SIZETEXT_REF 50 // worksheet frame reference text size #define TEXTSIZE 100 // worksheet text size #define PAS_REF 2000 // reference markings on worksheet frame // used in worksheet.cpp Loading Loading @@ -974,10 +973,8 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( wxPoint pos; wxPoint end; int refx, refy; wxString Line; Ki_WorkSheetData* WsItem; wxSize size( SIZETEXT * m_milsToIu, SIZETEXT * m_milsToIu ); wxSize size_ref( SIZETEXT_REF * m_milsToIu, SIZETEXT_REF * m_milsToIu ); wxSize size( TEXTSIZE * m_milsToIu, TEXTSIZE * m_milsToIu ); wxString msg; WS_DRAW_ITEM_TEXT* gtext; Loading @@ -994,10 +991,10 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( int lnWosn = m_penSize * 2; int lnWtonk = m_penSize; wxSize sz; wxSize size0_8( SIZETEXT * m_milsToIu * 0.8, SIZETEXT * m_milsToIu * 1 ); wxSize size1_5( SIZETEXT * m_milsToIu * 1.5, SIZETEXT * m_milsToIu * 1.5 ); wxSize size2( SIZETEXT * m_milsToIu * 2, SIZETEXT * m_milsToIu * 2 ); wxSize size3( SIZETEXT * m_milsToIu * 3, SIZETEXT * m_milsToIu * 3 ); wxSize size0_8( TEXTSIZE * m_milsToIu * 0.8, TEXTSIZE * m_milsToIu * 1 ); wxSize size1_5( TEXTSIZE * m_milsToIu * 1.5, TEXTSIZE * m_milsToIu * 1.5 ); wxSize size2( TEXTSIZE * m_milsToIu * 2, TEXTSIZE * m_milsToIu * 2 ); wxSize size3( TEXTSIZE * m_milsToIu * 3, TEXTSIZE * m_milsToIu * 3 ); // Draw the border. Append( new WS_DRAW_ITEM_RECT( Loading Loading @@ -1112,9 +1109,9 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( int index = 0; wxString fullMsg = msg; do // Reduce the height of wrapped title until the fit while( 1 ) // Reduce the height of wrapped title until the fit { do // Wrap the title while( 1 ) // Wrap the title { titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / m_milsToIu; Loading @@ -1122,7 +1119,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( { index = 0; do while( 1 ) { msg = msg.Left( msg.Length() - 1 ); Loading Loading @@ -1163,7 +1160,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( } } } } while( 1 ); } } else { Loading @@ -1180,7 +1177,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( break; } } while( 1 ); } if( titleFieldHeight < (int) ( titleHeight * lines.Count() ) ) { Loading @@ -1191,7 +1188,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( } else break; } while( 1 ); } pos.x = ( refx - Mm2mils( 85 ) ) * m_milsToIu; pos.y = Loading common/worksheet_shape_builder.h +2 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,8 @@ public: WS_DRAW_ITEM_LIST() { m_idx = 0; m_milsToIu = 1.0; m_penSize = 1; } ~WS_DRAW_ITEM_LIST() Loading eeschema/schframe.cpp +15 −18 Original line number Diff line number Diff line Loading @@ -530,27 +530,24 @@ wxString SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet() * However if filename is too long name is <sheet filename>-<sheet number> */ #define FN_LEN_MAX 100 // A reasonnable value for the full file name len fn.ClearExt(); wxString filename = fn.GetFullPath(); if( ( filename.Len() + m_CurrentSheet->PathHumanReadable().Len() ) < FN_LEN_MAX ) { filename += m_CurrentSheet->PathHumanReadable(); filename.Replace( wxT( "/" ), wxT( "-" ) ); filename.RemoveLast(); // To avoid issues on unix, ensure the filename does not start // by '-', which has a special meaning in command lines #ifndef __WINDOWS__ wxString newfn; if( filename.StartsWith( wxT( "-" ), &newfn ) ) filename = newfn; #endif } #define FN_LEN_MAX 80 // A reasonable value for the short filename len wxString filename = fn.GetName(); wxString sheetFullName = m_CurrentSheet->PathHumanReadable(); sheetFullName.Trim( true ); sheetFullName.Trim( false ); // Remove the last '/' of the path human readable // (and for the root sheet, make sheetFullName empty): sheetFullName.RemoveLast(); // Convert path human readable separator to '-' sheetFullName.Replace( wxT( "/" ), wxT( "-" ) ); if( ( filename.Len() + sheetFullName.Len() ) < FN_LEN_MAX ) filename += sheetFullName; else { filename << wxT( "-" ) << GetScreen()->m_ScreenNumber; } return filename; } Loading Loading
common/title_block_shapes.h +196 −295 File changed.Preview size limit exceeded, changes collapsed. Show changes
common/title_block_shapes_gost.h +12 −15 Original line number Diff line number Diff line Loading @@ -35,8 +35,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #define SIZETEXT 100 // worksheet text size #define SIZETEXT_REF 50 // worksheet frame reference text size #define TEXTSIZE 100 // worksheet text size #define PAS_REF 2000 // reference markings on worksheet frame // used in worksheet.cpp Loading Loading @@ -974,10 +973,8 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( wxPoint pos; wxPoint end; int refx, refy; wxString Line; Ki_WorkSheetData* WsItem; wxSize size( SIZETEXT * m_milsToIu, SIZETEXT * m_milsToIu ); wxSize size_ref( SIZETEXT_REF * m_milsToIu, SIZETEXT_REF * m_milsToIu ); wxSize size( TEXTSIZE * m_milsToIu, TEXTSIZE * m_milsToIu ); wxString msg; WS_DRAW_ITEM_TEXT* gtext; Loading @@ -994,10 +991,10 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( int lnWosn = m_penSize * 2; int lnWtonk = m_penSize; wxSize sz; wxSize size0_8( SIZETEXT * m_milsToIu * 0.8, SIZETEXT * m_milsToIu * 1 ); wxSize size1_5( SIZETEXT * m_milsToIu * 1.5, SIZETEXT * m_milsToIu * 1.5 ); wxSize size2( SIZETEXT * m_milsToIu * 2, SIZETEXT * m_milsToIu * 2 ); wxSize size3( SIZETEXT * m_milsToIu * 3, SIZETEXT * m_milsToIu * 3 ); wxSize size0_8( TEXTSIZE * m_milsToIu * 0.8, TEXTSIZE * m_milsToIu * 1 ); wxSize size1_5( TEXTSIZE * m_milsToIu * 1.5, TEXTSIZE * m_milsToIu * 1.5 ); wxSize size2( TEXTSIZE * m_milsToIu * 2, TEXTSIZE * m_milsToIu * 2 ); wxSize size3( TEXTSIZE * m_milsToIu * 3, TEXTSIZE * m_milsToIu * 3 ); // Draw the border. Append( new WS_DRAW_ITEM_RECT( Loading Loading @@ -1112,9 +1109,9 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( int index = 0; wxString fullMsg = msg; do // Reduce the height of wrapped title until the fit while( 1 ) // Reduce the height of wrapped title until the fit { do // Wrap the title while( 1 ) // Wrap the title { titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / m_milsToIu; Loading @@ -1122,7 +1119,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( { index = 0; do while( 1 ) { msg = msg.Left( msg.Length() - 1 ); Loading Loading @@ -1163,7 +1160,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( } } } } while( 1 ); } } else { Loading @@ -1180,7 +1177,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( break; } } while( 1 ); } if( titleFieldHeight < (int) ( titleHeight * lines.Count() ) ) { Loading @@ -1191,7 +1188,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( } else break; } while( 1 ); } pos.x = ( refx - Mm2mils( 85 ) ) * m_milsToIu; pos.y = Loading
common/worksheet_shape_builder.h +2 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,8 @@ public: WS_DRAW_ITEM_LIST() { m_idx = 0; m_milsToIu = 1.0; m_penSize = 1; } ~WS_DRAW_ITEM_LIST() Loading
eeschema/schframe.cpp +15 −18 Original line number Diff line number Diff line Loading @@ -530,27 +530,24 @@ wxString SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet() * However if filename is too long name is <sheet filename>-<sheet number> */ #define FN_LEN_MAX 100 // A reasonnable value for the full file name len fn.ClearExt(); wxString filename = fn.GetFullPath(); if( ( filename.Len() + m_CurrentSheet->PathHumanReadable().Len() ) < FN_LEN_MAX ) { filename += m_CurrentSheet->PathHumanReadable(); filename.Replace( wxT( "/" ), wxT( "-" ) ); filename.RemoveLast(); // To avoid issues on unix, ensure the filename does not start // by '-', which has a special meaning in command lines #ifndef __WINDOWS__ wxString newfn; if( filename.StartsWith( wxT( "-" ), &newfn ) ) filename = newfn; #endif } #define FN_LEN_MAX 80 // A reasonable value for the short filename len wxString filename = fn.GetName(); wxString sheetFullName = m_CurrentSheet->PathHumanReadable(); sheetFullName.Trim( true ); sheetFullName.Trim( false ); // Remove the last '/' of the path human readable // (and for the root sheet, make sheetFullName empty): sheetFullName.RemoveLast(); // Convert path human readable separator to '-' sheetFullName.Replace( wxT( "/" ), wxT( "-" ) ); if( ( filename.Len() + sheetFullName.Len() ) < FN_LEN_MAX ) filename += sheetFullName; else { filename << wxT( "-" ) << GetScreen()->m_ScreenNumber; } return filename; } Loading