Commit 4a515196 authored by charras's avatar charras
Browse files

eeschema: annotate dialog converted from DialogBlocks to wxFormBuilder

parent 1c983b01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
#include "appl_wxstruct.h"


#define BUILD_VERSION "(20091024-unstable)"
#define BUILD_VERSION "(20091027-unstable)"


#ifdef HAVE_SVN_VERSION
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ set(EESCHEMA_SRCS
    database.cpp
    delete.cpp
    delsheet.cpp
#   dialog_backanno.cpp
    dialog_annotate_base.cpp
    dialog_bodygraphictext_properties_base.cpp
    dialog_build_BOM.cpp
    dialog_build_BOM_base.cpp
+60 −263
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
// Name:        annotate_dialog.cpp
// Purpose:
// Author:      jean-pierre Charras
// Modified by:
// Created:     16/04/2008 17:50:59
// RCS-ID:
// Copyright:   License GNU
// Licence:
// Licence:   License GNU
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 16/04/2008 17:50:59

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "annotate_dialog.h"
#endif

////@begin includes
////@end includes

#include "fctsys.h"
#include "appl_wxstruct.h"
#include "bitmaps.h"
#include "common.h"
#include "program.h"

#include "annotate_dialog.h"

#define KEY_ANNOTATE_SORT_OPTION wxT("AnnotateSortOption")

extern void AnnotateComponents( WinEDA_SchematicFrame* parent,
                                bool annotateSchematic,
                                int sortOption,
                                bool resetAnnotation,
                                bool repairsTimestamps );

////@begin XPM images
////@end XPM images


/*!
 * WinEDA_AnnotateFrame type definition
 */

IMPLEMENT_DYNAMIC_CLASS( WinEDA_AnnotateFrame, wxDialog )


/*!
 * WinEDA_AnnotateFrame event table definition
 */

BEGIN_EVENT_TABLE( WinEDA_AnnotateFrame, wxDialog )

////@begin WinEDA_AnnotateFrame event table entries
    EVT_BUTTON( wxID_CANCEL, WinEDA_AnnotateFrame::OnCancelClick )

    EVT_BUTTON( ID_CLEAR_ANNOTATION_CMP, WinEDA_AnnotateFrame::OnClearAnnotationCmpClick )

    EVT_BUTTON( wxID_APPLY, WinEDA_AnnotateFrame::OnApplyClick )

////@end WinEDA_AnnotateFrame event table entries

END_EVENT_TABLE()


/*!
 * WinEDA_AnnotateFrame constructors
 */

WinEDA_AnnotateFrame::WinEDA_AnnotateFrame()
{
    Init();
}

WinEDA_AnnotateFrame::WinEDA_AnnotateFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
DIALOG_ANNOTATE::DIALOG_ANNOTATE( WinEDA_SchematicFrame* parent )
    : DIALOG_ANNOTATE_BASE( parent )
{
    m_Parent = parent;
    Init();
    Create(parent, id, caption, pos, size, style);
}


/*!
 * WinEDA_AnnotateFrame creator
 */

bool WinEDA_AnnotateFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin WinEDA_AnnotateFrame creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
    InitValues();
    Layout();
    GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end WinEDA_AnnotateFrame creation
    return true;
}


/*!
 * WinEDA_AnnotateFrame destructor
 */

WinEDA_AnnotateFrame::~WinEDA_AnnotateFrame()
/*********************************/
void DIALOG_ANNOTATE::InitValues()
/*********************************/
{
////@begin WinEDA_AnnotateFrame destruction
////@end WinEDA_AnnotateFrame destruction
}


/*!
 * Member initialisation
 */

void WinEDA_AnnotateFrame::Init()
    m_Config = wxGetApp().m_EDA_Config;
	SetFocus();	// needed to close dialog by escape key
    if( m_Config )
    {
////@begin WinEDA_AnnotateFrame member initialisation
    m_rbEntireSchematic = NULL;
    m_rbKeepAnnotation = NULL;
    m_rbResetAnnotation = NULL;
    m_rbSortBy_X_Position = NULL;
    m_rbSortBy_Y_Position = NULL;
    rbSortByValue = NULL;
    sizerDialogButtons = NULL;
    m_btnClose = NULL;
    m_btnClear = NULL;
    m_btnApply = NULL;
////@end WinEDA_AnnotateFrame member initialisation
}


/*!
 * Control creation for WinEDA_AnnotateFrame
 */

void WinEDA_AnnotateFrame::CreateControls()
        long option;
        m_Config->Read(KEY_ANNOTATE_SORT_OPTION, &option, 0l);
        switch( option )
        {
////@begin WinEDA_AnnotateFrame content construction
    // Generated by DialogBlocks, 29/04/2009 13:38:10 (unregistered)

    WinEDA_AnnotateFrame* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);

    wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticText4->SetFont(wxFont(int(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize()*1.2), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetStyle(), wxBOLD, false, wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()));
    itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_LEFT|wxALL, 5);

    wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer3->Add(itemBoxSizer5, 0, wxGROW|wxLEFT, 25);
            case 0:
                m_rbSortBy_X_Position->SetValue(1);
                break;

    m_rbEntireSchematic = new wxRadioButton( itemDialog1, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
    m_rbEntireSchematic->SetValue(true);
    itemBoxSizer5->Add(m_rbEntireSchematic, 0, wxGROW|wxALL, 5);

    wxRadioButton* itemRadioButton7 = new wxRadioButton( itemDialog1, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 );
    itemRadioButton7->SetValue(false);
    itemBoxSizer5->Add(itemRadioButton7, 0, wxGROW|wxALL, 5);
            case 1:
                m_rbSortBy_Y_Position->SetValue(1);
                break;

    wxStaticLine* itemStaticLine8 = new wxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
    itemBoxSizer5->Add(itemStaticLine8, 0, wxGROW|wxALL, 5);

    m_rbKeepAnnotation = new wxRadioButton( itemDialog1, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
    m_rbKeepAnnotation->SetValue(true);
    itemBoxSizer5->Add(m_rbKeepAnnotation, 0, wxGROW|wxALL, 5);
            case 2:
                rbSortByValue->SetValue(1);
                break;

    m_rbResetAnnotation = new wxRadioButton( itemDialog1, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 );
    m_rbResetAnnotation->SetValue(false);
    itemBoxSizer5->Add(m_rbResetAnnotation, 0, wxGROW|wxALL, 5);

    wxStaticText* itemStaticText11 = new wxStaticText( itemDialog1, wxID_STATIC, _("Order"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticText11->SetFont(wxFont(int(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize()*1.2), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetStyle(), wxBOLD, false, wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()));
    itemBoxSizer3->Add(itemStaticText11, 0, wxALIGN_LEFT|wxALL, 5);

    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer3->Add(itemBoxSizer12, 0, wxGROW|wxLEFT, 25);

    wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer12->Add(itemBoxSizer13, 0, wxGROW, 5);

    wxStaticBitmap* itemStaticBitmap14 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("annotate_down_right_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer13->Add(itemStaticBitmap14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_rbSortBy_X_Position = new wxRadioButton( itemDialog1, ID_SORT_BY_X_POSITION, _("Sort components by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
    m_rbSortBy_X_Position->SetValue(true);
    itemBoxSizer13->Add(m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer16 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer12->Add(itemBoxSizer16, 0, wxGROW, 5);

    wxStaticBitmap* itemStaticBitmap17 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("annotate_right_down_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer16->Add(itemStaticBitmap17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_rbSortBy_Y_Position = new wxRadioButton( itemDialog1, ID_SORT_BY_Y_POSITION, _("Sort components by &Y position"), wxDefaultPosition, wxDefaultSize, 0 );
    m_rbSortBy_Y_Position->SetValue(false);
    itemBoxSizer16->Add(m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer12->Add(itemBoxSizer19, 0, wxGROW, 5);

    wxStaticBitmap* itemStaticBitmap20 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("add_text_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer19->Add(itemStaticBitmap20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    rbSortByValue = new wxRadioButton( itemDialog1, ID_SORT_BY_VALUE, _("Sort components by &value"), wxDefaultPosition, wxDefaultSize, 0 );
    rbSortByValue->SetValue(false);
    itemBoxSizer19->Add(rbSortByValue, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    sizerDialogButtons = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(sizerDialogButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    m_btnClose = new wxButton( itemDialog1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
    m_btnClose->SetDefault();
    sizerDialogButtons->Add(m_btnClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_btnClear = new wxButton( itemDialog1, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
    sizerDialogButtons->Add(m_btnClear, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    m_btnApply = new wxButton( itemDialog1, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
    m_btnApply->SetDefault();
    sizerDialogButtons->Add(m_btnApply, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

////@end WinEDA_AnnotateFrame content construction

	m_btnClose->SetFocus();	// needed to closes dialog by escape key
            default:
                break;
        }
    }

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

/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY
 */

void WinEDA_AnnotateFrame::OnApplyClick( wxCommandEvent& event )
/*********************************************************/
void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
/*********************************************************/
{
    int response;
    wxString message;

    if( m_Config )
        m_Config->Write(KEY_ANNOTATE_SORT_OPTION, GetSortOrder());

    if( GetResetItems() )
        message = _( "Clear and annotate all of the components " );
    else
@@ -259,11 +102,9 @@ void WinEDA_AnnotateFrame::OnApplyClick( wxCommandEvent& event )
}


/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DEANNOTATE_CMP
 */

void WinEDA_AnnotateFrame::OnClearAnnotationCmpClick( wxCommandEvent& event )
/************************************************************************/
void DIALOG_ANNOTATE::OnClearAnnotationCmpClick( wxCommandEvent& event )
/************************************************************************/
{
    int response;

@@ -283,11 +124,9 @@ void WinEDA_AnnotateFrame::OnClearAnnotationCmpClick( wxCommandEvent& event )
}


/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
 */

void WinEDA_AnnotateFrame::OnCancelClick( wxCommandEvent& event )
/************************************************************/
void DIALOG_ANNOTATE::OnCancelClick( wxCommandEvent& event )
/************************************************************/
{
    if( IsModal() )
        EndModal( wxID_CANCEL );
@@ -299,17 +138,23 @@ void WinEDA_AnnotateFrame::OnCancelClick( wxCommandEvent& event )
}


bool WinEDA_AnnotateFrame::GetLevel( void )
/**************************************/
bool DIALOG_ANNOTATE::GetLevel( void )
/**************************************/
{
    return m_rbEntireSchematic->GetValue();
}

bool WinEDA_AnnotateFrame::GetResetItems( void )
/******************************************/
bool DIALOG_ANNOTATE::GetResetItems( void )
/******************************************/
{
    return m_rbResetAnnotation->GetValue();
}

int WinEDA_AnnotateFrame::GetSortOrder( void )
/****************************************/
int DIALOG_ANNOTATE::GetSortOrder( void )
/****************************************/
/**
 * @return 0 if annotation by X position,
 *         1 if annotation by Y position
@@ -323,51 +168,3 @@ int WinEDA_AnnotateFrame::GetSortOrder( void )
    return 2;
}


/*!
 * Should we show tooltips?
 */

bool WinEDA_AnnotateFrame::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap WinEDA_AnnotateFrame::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
    if (name == wxT("annotate_down_right_xpm"))
    {
        wxBitmap bitmap(annotate_down_right_xpm);
        return bitmap;
    }
    else if (name == wxT("annotate_right_down_xpm"))
    {
        wxBitmap bitmap(annotate_right_down_xpm);
        return bitmap;
    }
    else if (name == wxT("add_text_xpm"))
    {
        wxBitmap bitmap(add_text_xpm);
        return bitmap;
    }
    return wxNullBitmap;
}

/*!
 * Get icon resources
 */

wxIcon WinEDA_AnnotateFrame::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin WinEDA_AnnotateFrame icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end WinEDA_AnnotateFrame icon retrieval
}
+31 −107
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
// Name:        annotate_dialog.h
// Purpose:
// Author:      jean-pierre Charras
// Modified by:
// Created:     16/04/2008 17:50:59
// RCS-ID:
// Copyright:   License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 16/04/2008 17:50:59
/*
 * This program source code file is part of KICAD, a free EDA CAD application.
 *
 * Copyright (C) 1992-2009 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
 */

#ifndef _ANNOTATE_DIALOG_H_
#define _ANNOTATE_DIALOG_H_

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "annotate_dialog.h"
#endif

/*!
 * Includes
 */

////@begin includes
#include "wx/statline.h"
////@end includes

/*!
 * Forward declarations
 */

////@begin forward declarations
class wxBoxSizer;
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_DIALOG 10000
#define ID_ENTIRE_SCHEMATIC 10002
#define ID_CURRENT_PAGE 10003
#define ID_KEEP_ANNOTATION 10009
#define ID_RESET_ANNOTATION 10009
#define ID_SORT_BY_X_POSITION 10001
#define ID_SORT_BY_Y_POSITION 10001
#define ID_SORT_BY_VALUE 10011
#define ID_CLEAR_ANNOTATION_CMP 10004
#define SYMBOL_WINEDA_ANNOTATEFRAME_STYLE wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_ANNOTATEFRAME_TITLE _("EESchema Annotation")
#define SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_ANNOTATEFRAME_POSITION wxDefaultPosition
////@end control identifiers

#include "dialog_annotate_base.h"

/*!
 * WinEDA_AnnotateFrame class declaration
 * DIALOG_ANNOTATE class declaration
 */

class WinEDA_AnnotateFrame: public wxDialog
class DIALOG_ANNOTATE: public DIALOG_ANNOTATE_BASE
{
    DECLARE_DYNAMIC_CLASS( WinEDA_AnnotateFrame )
    DECLARE_EVENT_TABLE()
private:
    WinEDA_SchematicFrame * m_Parent;
    wxConfig* m_Config;

public:
    /// Constructors
    WinEDA_AnnotateFrame();
    WinEDA_AnnotateFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_ANNOTATEFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_ANNOTATEFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_ANNOTATEFRAME_SIZE, long style = SYMBOL_WINEDA_ANNOTATEFRAME_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_ANNOTATEFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_ANNOTATEFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_ANNOTATEFRAME_SIZE, long style = SYMBOL_WINEDA_ANNOTATEFRAME_STYLE );

    /// Destructor
    ~WinEDA_AnnotateFrame();
    DIALOG_ANNOTATE( WinEDA_SchematicFrame* parent );
    ~DIALOG_ANNOTATE(){};

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin WinEDA_AnnotateFrame event handler declarations

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
    void InitValues();
    void OnCancelClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_ANNOTATION_CMP
    void OnClearAnnotationCmpClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY
    void OnApplyClick( wxCommandEvent& event );

////@end WinEDA_AnnotateFrame event handler declarations

////@begin WinEDA_AnnotateFrame member function declarations

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end WinEDA_AnnotateFrame member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

    // User functions:
    bool GetLevel( void );
    bool GetResetItems( void );
    int GetSortOrder( void );

////@begin WinEDA_AnnotateFrame member variables
    wxRadioButton* m_rbEntireSchematic;
    wxRadioButton* m_rbKeepAnnotation;
    wxRadioButton* m_rbResetAnnotation;
    wxRadioButton* m_rbSortBy_X_Position;
    wxRadioButton* m_rbSortBy_Y_Position;
    wxRadioButton* rbSortByValue;
    wxBoxSizer* sizerDialogButtons;
    wxButton* m_btnClose;
    wxButton* m_btnClear;
    wxButton* m_btnApply;
////@end WinEDA_AnnotateFrame member variables

    WinEDA_SchematicFrame * m_Parent;

};

#endif
+7 −0
Original line number Diff line number Diff line
@@ -408,6 +408,13 @@ void SCH_COMPONENT::SetRef( DrawSheetPath* sheet, const wxString& ref )
    }

    rf->m_Text = ref;  // for drawing.
    
    // Reinit the m_PrefixString member if needed
    wxString prefix = ref;
    while( prefix.Last() == '?' or isdigit(prefix.Last()) )
        prefix.RemoveLast();
    if( m_PrefixString != prefix )
        m_PrefixString = prefix;
}

/** function SetTimeStamp
Loading