Commit ff9cdca9 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Dialog annotate changes to use new annotation algorithm.

parent 58d98beb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ endif(WIN32)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)

# Command line option to enable or disable building minizip. Minizip
# building is enabled by default. Use -DKICAD_MINZIP=OFF to disable
# building is enabled by default. Use -DKICAD_MINIZIP=OFF to disable
# building minizip.
option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)

+96 −54
Original line number Diff line number Diff line
@@ -21,7 +21,38 @@

//#define USE_OLD_ALGO

static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList, bool aUseSheetNum );
/**
 * Function ComputeReferenceNumber
 * Compute the reference number for components without reference number
 * i.e. .m_NumRef member of each SCH_REFERENCE_LIST item not yet annotated
 * in aComponentsList.
 * if aUseSheetNum is false, this number starts from 1
 * if aUseSheetNum is false, this number starts from from SheetNumber * aSheetIntervalId
 * @param aComponentsList = the SCH_REFERENCE_LIST to fill
 * @param aUseSheetNum = false to start Ids from 0,
 *                       true to start each sheet annotation from SheetNumber * aSheetIntervalId
 * @param aSheetIntervalId = number of allowed Id by sheet and by reference prefix
 *       if There are more than aSheetIntervalId of  reference prefix in a given sheet
 *       number overlap next sheet inveral, but there is no annotation problem.
 *       Useful values are only 100 or 1000
 * For instance for a sheet number = 2, and aSheetIntervalId = 100, the first Id = 101
 * and the last Id is 199 when no overlap occurs with sheet number 2.
 * Rf there are 150 items in sheet number 2, items are referenced U201 to U351,
 * and items in sheet 3 start from U352
 */
static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList,
                                    bool aUseSheetNum, int aSheetIntervalId );

/**
 * Search in the sorted list of components, for a given component an other
 * component with the same reference and a given part unit.  Mainly used to
 * manage multiple parts per package components in aComponentsList.
 * @param aObjet = index in aComponentsList for the given SCH_REFERENCE
 *                 item to test
 * @param Unit = the given unit number to search
 * @param aComponentsList = list of items to examine
 * @return index in aComponentsList if found or -1 if not found
 */
static int  ExistUnit( int aObjet, int aUnit, SCH_REFERENCE_LIST& aComponentList );

/**
@@ -50,30 +81,36 @@ void SCH_EDIT_FRAME::DeleteAnnotation( bool aCurrentSheetOnly )


/**
 * AnnotateComponents:
 * Function AnnotateComponents:
 *
 *  Compute the annotation of the components for the whole project, or the
 *  current sheet only.  All the components or the new ones only will be
 *  annotated.
 * @param parent = Schematic frame
 * @param annotateSchematic : true = entire schematic annotation,
 * @param aAnnotateSchematic : true = entire schematic annotation,
 *                            false = current sheet only
 * @param sortOption : 0 = annotate by sorting X position,
 * @param aSortOption : 0 = annotate by sorting X position,
 *                      1 = annotate by sorting Y position,
 *                      2 = annotate by sorting value
 * @param resetAnnotation : true = remove previous annotation
 * @param aAlgoOption : 0 = annotate schematic using first free Id number
 *                      1 = annotate using first free Id number, starting to sheet number * 100
 *                      2 = annotate  using first free Id number, starting to sheet number * 1000
 * @param aResetAnnotation : true = remove previous annotation
 *                          false = annotate new components only
 * @param repairsTimestamps : true = test for duplicate times stamps and
 * @param aRepairsTimestamps : true = test for duplicate times stamps and
 *                                   replace duplicated
 *        Note: this option could change previous annotation, because time
 *              stamps are used to handle annotation mainly in complex
 *              hierarchies.
 * When the sheet number is used in annotation,
 *      for each sheet annotation starts from sheet number * 100
 *      ( the first sheet uses 100 to 199, the second 200 to 299 ... )
 */
void SCH_EDIT_FRAME::AnnotateComponents(
                         bool            annotateSchematic,
                         int             sortOption,
                         bool            resetAnnotation,
                         bool            repairsTimestamps )
                         bool            aAnnotateSchematic,
                         int             aSortOption,
                         int             aAlgoOption,
                         bool            aResetAnnotation,
                         bool            aRepairsTimestamps )
{
    SCH_REFERENCE_LIST references;

@@ -87,7 +124,7 @@ void SCH_EDIT_FRAME::AnnotateComponents(
    // Test for and replace duplicate time stamps in components and sheets.  Duplicate
    // time stamps can happen with old schematics, schematic conversions, or manual
    // editing of files.
    if( repairsTimestamps )
    if( aRepairsTimestamps )
    {
        int count = screens.ReplaceDuplicateTimeStamps();

@@ -100,8 +137,8 @@ void SCH_EDIT_FRAME::AnnotateComponents(
    }

    // If it is an annotation for all the components, reset previous annotation.
    if( resetAnnotation )
        DeleteAnnotation( !annotateSchematic );
    if( aResetAnnotation )
        DeleteAnnotation( !aAnnotateSchematic );

    // Update the screen date.
    screens.SetDate( GenDate() );
@@ -110,7 +147,7 @@ void SCH_EDIT_FRAME::AnnotateComponents(
    SetSheetNumberAndCount();

    /* Build component list */
    if( annotateSchematic )
    if( aAnnotateSchematic )
    {
        sheets.GetComponents( references );
    }
@@ -123,38 +160,42 @@ void SCH_EDIT_FRAME::AnnotateComponents(
     * example: IC1 become IC, and 1 */
    references.SplitReferences( );

    bool useSheetNum = false;
    switch( sortOption )
    switch( aSortOption )
    {
    default:
    case 0:
        references.SortCmpByXCoordinate();
        break;

    case 1:
        useSheetNum = true;
        references.SortCmpByXCoordinate();
        references.SortCmpByYCoordinate();
        break;
    }

    case 2:
        references.SortCmpByYCoordinate();
    bool useSheetNum = false;
    int idStep = 100;
    switch( aAlgoOption )
    {
    default:
    case 0:
        break;

    case 3:
    case 1:
        useSheetNum = true;
        references.SortCmpByYCoordinate();
        break;

    case 4:
        references.SortComponentsByRefAndValue();
    case 2:
        useSheetNum = true;
        idStep = 1000;
        break;
    }

    // Recalculate and update reference numbers in schematic
    ComputeReferenceNumber( references, useSheetNum );
    ComputeReferenceNumber( references, useSheetNum, idStep );
    references.UpdateAnnotation();

    /* Final control (just in case ... )*/
    CheckAnnotate( NULL, !annotateSchematic );
    CheckAnnotate( NULL, !aAnnotateSchematic );
    OnModify();

    // Update on screen refences, that can be modified by previous calculations:
@@ -198,6 +239,8 @@ static int GetLastNumberInReference( int aObjet,SCH_REFERENCE_LIST& aComponentsL
/**
 * helper function BuildRefIdInUseList
 * creates the list of reference numbers in use for a given reference prefix.
 * This list is read by CreateFirstFreeRefId to fing not yet used reference Id.
 * @see CreateFirstFreeRefId
 * @param aObjet = the current component index to use for reference prefix filtering.
 * @param aComponentsList = the full list of components
 * @param aIdList = the buffer to fill
@@ -218,19 +261,18 @@ static void BuildRefIdInUseList( int aObjet,SCH_REFERENCE_LIST& aComponentsList

    // Ensure each reference Id appears only once
    // If there are multiple parts per package the same Id will be stored for each part.
    for( unsigned ii = 1; ii < aIdList.size(); ii++ )
    {
        if( aIdList[ii] != aIdList[ii-1] )
            continue;
        aIdList.erase(aIdList.begin() + ii );
        ii--;
    }
    std::vector<int>::iterator new_end = unique( aIdList.begin(), aIdList.end() );
    if( new_end != aIdList.end() )
        aIdList.erase(new_end, aIdList.end() );
}

/**
 * helper function CreateFirstFreeRefId
 * Search for a free ref Id inside a list of reference numbers in use.
 * This list is expected sorted by increasing values, and each value stored only once
 * Because this function just search for a hole in a list of incremented numbers,
 * this list must be:
 *      sorted by increasing values.
 *      and each value stored only once
 * @see BuildRefIdInUseList to prepare this list
 * @param aIdList = the buffer that contains Ids in use
 * @param aFirstValue = the first expected free value
@@ -271,10 +313,15 @@ static int CreateFirstFreeRefId( std::vector<int>& aIdList, int aFirstValue )
#endif

/*
 * Function ComputeReferenceNumber
 * Compute the reference number for components without reference number
 *  Compute .m_NumRef member
 * i.e. .m_NumRef member of each SCH_REFERENCE_LIST item not yet annotated
 * in aComponentsList.
 * if aUseSheetNum is false, this number starts from 1
 * if aUseSheetNum is false, this number starts from from SheetNumber * aSheetIntervalId
 */
static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList, bool aUseSheetNum  )
static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList,
                                    bool aUseSheetNum, int aSheetIntervalId  )
{
    if ( aComponentsList.GetCount() == 0 )
        return;
@@ -304,15 +351,15 @@ static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList, bool aU
    /* calculate the last used number for this reference prefix: */
#ifdef USE_OLD_ALGO
    int minRefId = 0;
    // when using sheet number, ensure ref number >= sheet number* 100
    // when using sheet number, ensure ref number >= sheet number* aSheetIntervalId
    if( aUseSheetNum )
        minRefId = aComponentsList[first].m_SheetNum * 100;
        minRefId = aComponentsList[first].m_SheetNum * aSheetIntervalId;
    LastReferenceNumber = GetLastNumberInReference( first, aComponentsList, minRefId );
#else
    int minRefId = 1;
    // when using sheet number, ensure ref number >= sheet number* 100
    // when using sheet number, ensure ref number >= sheet number* aSheetIntervalId
    if( aUseSheetNum )
        minRefId = aComponentsList[first].m_SheetNum * 100 + 1;
        minRefId = aComponentsList[first].m_SheetNum * aSheetIntervalId + 1;
    // This is the list of all Id already in use for a given reference prefix.
    // Will be refilled for each new reference prefix.
    std::vector<int>idList;
@@ -331,15 +378,15 @@ static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList, bool aU
            first = ii;
#ifdef USE_OLD_ALGO
            minRefId = 0;
            // when using sheet number, ensure ref number >= sheet number* 100
            // when using sheet number, ensure ref number >= sheet number* aSheetIntervalId
            if( aUseSheetNum )
                minRefId = aComponentsList[ii].m_SheetNum * 100;
                minRefId = aComponentsList[ii].m_SheetNum * aSheetIntervalId;
            LastReferenceNumber = GetLastNumberInReference( ii, aComponentsList, minRefId);
#else
            minRefId = 1;
            // when using sheet number, ensure ref number >= sheet number* 100
            // when using sheet number, ensure ref number >= sheet number* aSheetIntervalId
            if( aUseSheetNum )
                minRefId = aComponentsList[ii].m_SheetNum * 100 + 1;
                minRefId = aComponentsList[ii].m_SheetNum * aSheetIntervalId + 1;
            BuildRefIdInUseList( first, aComponentsList, idList, minRefId );
#endif
        }
@@ -428,15 +475,10 @@ static void ComputeReferenceNumber( SCH_REFERENCE_LIST& aComponentsList, bool aU
}


/**
/*
 * Search in the sorted list of components, for a given component an other
 * component with the same reference and a given part unit.  Mainly used to
 * manage multiple parts per package components.
 * @param aObjet = index in aComponentsList for the given SCH_REFERENCE
 *                 item to test
 * @param Unit = the given unit number to search
 * @param aComponentsList = list of items to examine
 * @return index in aComponentsList if found or -1 if not found
 * manage multiple parts per package components in aComponentsList.
 */
static int ExistUnit( int aObjet, int Unit, SCH_REFERENCE_LIST& aComponentsList )
{
+70 −27
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
// Name:        annotate_dialog.cpp
// Licence:   License GNU
/////////////////////////////////////////////////////////////////////////////
/*
*  annotate_dialog.cpp
*/
/*
 * annotate_dialog.cpp
 * Annotation dialog functions.
 */

/*
 * This program source code file is part of KICAD, a free EDA CAD application.
 *
 * Copyright (C) 1992-2011 jean-pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
  * Copyright (C) 1992-2011 Kicad Developers, see change_log.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */


#include "fctsys.h"
@@ -14,6 +41,7 @@
#include "annotate_dialog.h"

#define KEY_ANNOTATE_SORT_OPTION wxT("AnnotateSortOption")
#define KEY_ANNOTATE_ALGO_OPTION wxT("AnnotateAlgoOption")


DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent )
@@ -45,31 +73,36 @@ void DIALOG_ANNOTATE::InitValues()
                break;

            case 1:
                m_rbSortBy_X_Position_and_useSheet->SetValue(1);
                m_rbSortBy_Y_Position->SetValue(1);
                break;

            case 2:
                m_rbSortBy_Y_Position->SetValue(1);
                m_rbUseIncremental->SetValue(1);
                break;
            }

            case 3:
                m_rbSortBy_Y_Position_and_useSheet->SetValue(1);
        m_Config->Read(KEY_ANNOTATE_ALGO_OPTION, &option, 0l);
        switch( option )
        {
            default:
            case 0:
                m_rbUseIncremental->SetValue(1);
                break;

            case 4:
                rbSortByValue->SetValue(1);
            case 1:
                m_rbUseSheetNum->SetValue(1);
                break;

            case 2:
                m_rbStartSheetNumLarge->SetValue(1);
                break;
        }
    }

    wxBitmap bitmap0(annotate_down_right_xpm);
    annotate_down_right_bitmap->SetBitmap(bitmap0);
    annotate_down_right_bitmap1->SetBitmap(bitmap0);
    wxBitmap bitmap1(annotate_right_down_xpm);
	annotate_right_down_bitmap->SetBitmap(bitmap1);
	annotate_right_down_bitmap1->SetBitmap(bitmap1);
    wxBitmap bitmap2(add_text_xpm);
	annotate_by_value_bitmap->SetBitmap(bitmap2);

    m_btnApply->SetDefault();
}
@@ -83,7 +116,10 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
    wxString message;

    if( m_Config )
    {
        m_Config->Write(KEY_ANNOTATE_SORT_OPTION, GetSortOrder());
        m_Config->Write(KEY_ANNOTATE_ALGO_OPTION, GetAnnotateAlgo());
    }

    if( GetResetItems() )
        message = _( "Clear and annotate all of the components " );
@@ -98,7 +134,9 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
    response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL );
    if (response == wxCANCEL)
        return;
    m_Parent->AnnotateComponents( GetLevel(), GetSortOrder(), GetResetItems() , true );

    m_Parent->AnnotateComponents( GetLevel(), GetSortOrder(), GetAnnotateAlgo(),
                                  GetResetItems() , true );
    m_Parent->DrawPanel->Refresh();

    m_btnClear->Enable();
@@ -157,25 +195,30 @@ bool DIALOG_ANNOTATE::GetResetItems( void )
    return m_rbResetAnnotation->GetValue();
}

/****************************************/
int DIALOG_ANNOTATE::GetSortOrder( void )
/****************************************/
/**
 * @return 0 if annotation by X position,
 *         1 if annotation by X position and use sheet number,
 *         2 if annotation by Y position,
 *         3 if annotation by Y position and use sheet number,
 *         4 if annotation by value
 *         1 if annotation by Y position,
 *         2 if annotation by value
 */
{
    if ( m_rbSortBy_X_Position->GetValue() )
        return 0;
    if ( m_rbSortBy_X_Position_and_useSheet->GetValue() )
        return 1;
    if ( m_rbSortBy_Y_Position->GetValue() )
        return 1;
    return 2;
    if ( m_rbSortBy_Y_Position_and_useSheet->GetValue() )
        return 3;
    return 4;
}

int DIALOG_ANNOTATE::GetAnnotateAlgo( void )
/**
 * @return 0 if annotation using first not used Id value
 *         1 if annotation using first not used Id value inside sheet num * 100 to  sheet num * 100 + 99
 *         2 if annotation using first nhot used Id value inside sheet num * 1000 to  sheet num * 1000 + 999
 */
{
    if ( m_rbUseIncremental->GetValue() )
        return 0;
    if ( m_rbUseSheetNum->GetValue() )
        return 1;
    return 2;
}
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public:
    bool GetLevel( void );
    bool GetResetItems( void );
    int GetSortOrder( void );

    int GetAnnotateAlgo( void );
};

#endif
+43 −33
Original line number Diff line number Diff line
@@ -71,20 +71,6 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
	
	b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND|wxRIGHT, 5 );
	
	wxBoxSizer* bSizerXpos_and_use_sheet;
	bSizerXpos_and_use_sheet = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbSortBy_X_Position_and_useSheet = new wxRadioButton( this, wxID_ANY, _("Sort components by X position and use sheet &number"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerXpos_and_use_sheet->Add( m_rbSortBy_X_Position_and_useSheet, 0, wxALL, 3 );
	
	
	bSizerXpos_and_use_sheet->Add( 0, 0, 1, wxEXPAND, 5 );
	
	annotate_down_right_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerXpos_and_use_sheet->Add( annotate_down_right_bitmap1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 );
	
	b_orderOptSizer->Add( bSizerXpos_and_use_sheet, 0, wxEXPAND|wxRIGHT, 5 );
	
	wxBoxSizer* bSizerYpos;
	bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
	
@@ -99,38 +85,62 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
	
	b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND|wxRIGHT, 5 );
	
	wxBoxSizer* bSizerYpos_and_useSheet;
	bSizerYpos_and_useSheet = new wxBoxSizer( wxHORIZONTAL );
	bupperSizer->Add( b_orderOptSizer, 0, wxEXPAND|wxLEFT, 25 );
	
	m_rbSortBy_Y_Position_and_useSheet = new wxRadioButton( this, wxID_ANY, _("Sort components by Y position and use &sheet number"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerYpos_and_useSheet->Add( m_rbSortBy_Y_Position_and_useSheet, 0, wxALL, 3 );
	m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizerAnnotAlgo;
	bSizerAnnotAlgo = new wxBoxSizer( wxVERTICAL );
	
	bSizerYpos_and_useSheet->Add( 0, 0, 1, wxEXPAND, 5 );
	m_staticTextAnnotateAlgo = new wxStaticText( this, wxID_ANY, _("Annotation Choice"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextAnnotateAlgo->Wrap( -1 );
	m_staticTextAnnotateAlgo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	annotate_right_down_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerYpos_and_useSheet->Add( annotate_right_down_bitmap1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
	bSizerAnnotAlgo->Add( m_staticTextAnnotateAlgo, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	b_orderOptSizer->Add( bSizerYpos_and_useSheet, 0, wxEXPAND|wxRIGHT, 5 );
	wxBoxSizer* bSizer1AlgoChoice;
	bSizer1AlgoChoice = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerValuepos;
	bSizerValuepos = new wxBoxSizer( wxHORIZONTAL );
	wxBoxSizer* bSizerChoiceInc;
	bSizerChoiceInc = new wxBoxSizer( wxHORIZONTAL );
	
	rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort components by &value"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerValuepos->Add( rbSortByValue, 0, wxALL, 3 );
	m_rbUseIncremental = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Use first free number in schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizerChoiceInc->Add( m_rbUseIncremental, 0, wxALL, 3 );
	
	
	bSizerValuepos->Add( 0, 0, 1, wxEXPAND, 5 );
	bSizerChoiceInc->Add( 0, 0, 1, wxEXPAND, 5 );
	
	annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
	bSizer1AlgoChoice->Add( bSizerChoiceInc, 0, wxEXPAND|wxRIGHT, 5 );
	
	b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND|wxRIGHT, 5 );
	wxBoxSizer* bSizerChoiceIncBySheet;
	bSizerChoiceIncBySheet = new wxBoxSizer( wxHORIZONTAL );
	
	bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 );
	m_rbUseSheetNum = new wxRadioButton( this, wxID_ANY, _("Start to  sheet number*100 and use first free number"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerChoiceIncBySheet->Add( m_rbUseSheetNum, 0, wxALL, 3 );
	
	m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
	
	bSizerChoiceIncBySheet->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer1AlgoChoice->Add( bSizerChoiceIncBySheet, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizerChoiceIncBySheetLarge;
	bSizerChoiceIncBySheetLarge = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbStartSheetNumLarge = new wxRadioButton( this, wxID_ANY, _("Start to  sheet number*1000 and use first free number"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerChoiceIncBySheetLarge->Add( m_rbStartSheetNumLarge, 0, wxALL, 3 );
	
	
	bSizerChoiceIncBySheetLarge->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer1AlgoChoice->Add( bSizerChoiceIncBySheetLarge, 1, wxEXPAND, 5 );
	
	bSizerAnnotAlgo->Add( bSizer1AlgoChoice, 1, wxEXPAND|wxLEFT, 25 );
	
	bupperSizer->Add( bSizerAnnotAlgo, 0, wxEXPAND|wxRIGHT, 5 );
	
	m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bupperSizer->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bButtonsSizer;
	bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
Loading