Commit 8fe06e12 authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Merge changes from testing head.

parents 8f6d69e5 bb8741c7
Loading
Loading
Loading
Loading
+17 −12
Original line number Original line Diff line number Diff line
/*
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 *
 * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
 * Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors.
 *
 *
 * This program is free software; you can redistribute it and/or
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * modify it under the terms of the GNU General Public License
@@ -863,7 +863,19 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()


    // Disable unit selection if only one unit exists:
    // Disable unit selection if only one unit exists:
    if( choiceCount <= 1 )
    if( choiceCount <= 1 )
    {
        unitChoice->Enable( false );
        unitChoice->Enable( false );
        unitsInterchageableLabel->Show( false );
        unitsInterchageableText->Show( false );
    }
    else
    {
        // Show the "Units are not interchangeable" message option?
        if( !m_LibEntry || !m_LibEntry->UnitsLocked() )
            unitsInterchageableLabel->SetLabel( _("Yes") );
        else
            unitsInterchageableLabel->SetLabel( _("No") );
    }


    int orientation = m_Cmp->GetOrientation()
    int orientation = m_Cmp->GetOrientation()
        & ~( CMP_MIRROR_X | CMP_MIRROR_Y );
        & ~( CMP_MIRROR_X | CMP_MIRROR_Y );
@@ -895,24 +907,17 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
    // Activate/Desactivate the normal/convert option ? (activated only if
    // Activate/Desactivate the normal/convert option ? (activated only if
    // the component has more than one shape)
    // the component has more than one shape)
    if( m_Cmp->GetConvert() > 1 )
    if( m_Cmp->GetConvert() > 1 )
    {
        convertCheckBox->SetValue( true );
        convertCheckBox->SetValue( true );
    }


    if( m_LibEntry == NULL || !m_LibEntry->HasConversion() )
    if( m_LibEntry == NULL || !m_LibEntry->HasConversion() )
    {
        convertCheckBox->Enable( false );
        convertCheckBox->Enable( false );
    }

    // Show the "Parts Locked" option?
    if( !m_LibEntry || !m_LibEntry->UnitsLocked() )
    {
        DBG( printf( "partsAreLocked->false\n" ); )
        partsAreLockedLabel->Show( false );
    }


    // Set the component's library name.
    // Set the component's library name.
    chipnameTextCtrl->SetValue( m_Cmp->m_ChipName );
    chipnameTextCtrl->SetValue( m_Cmp->m_ChipName );

    // Set the component's unique ID time stamp.
    m_textCtrlTimeStamp->SetValue( wxString::Format( wxT("%8.8lX"),
                                   (unsigned long) m_Cmp->GetTimeStamp() ) );
}
}




+29 −22
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// C++ code generated with wxFormBuilder (version Nov  6 2013)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -32,22 +32,27 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
	unitChoice->SetSelection( 0 );
	unitChoice->SetSelection( 0 );
	optionsSizer->Add( unitChoice, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	optionsSizer->Add( unitChoice, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	
	wxBoxSizer* orientationSizer;
	wxBoxSizer* bSizerUnitsInterchangeable;
	orientationSizer = new wxBoxSizer( wxHORIZONTAL );
	bSizerUnitsInterchangeable = new wxBoxSizer( wxHORIZONTAL );
	
	unitsInterchageableText = new wxStaticText( this, wxID_ANY, _("Units are interchangeable:"), wxDefaultPosition, wxDefaultSize, 0 );
	unitsInterchageableText->Wrap( -1 );
	bSizerUnitsInterchangeable->Add( unitsInterchageableText, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
	
	unitsInterchageableLabel = new wxStaticText( this, wxID_ANY, _("Yes"), wxDefaultPosition, wxDefaultSize, 0 );
	unitsInterchageableLabel->Wrap( -1 );
	bSizerUnitsInterchangeable->Add( unitsInterchageableLabel, 0, wxALL, 5 );
	
	
	optionsSizer->Add( bSizerUnitsInterchangeable, 1, wxEXPAND, 5 );
	
	
	wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
	wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
	int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
	int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
	orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
	orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
	orientationRadioBox->SetSelection( 0 );
	orientationRadioBox->SetSelection( 1 );
	orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
	orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
	
	
	orientationSizer->Add( orientationRadioBox, 1, wxALL|wxEXPAND, 8 );
	optionsSizer->Add( orientationRadioBox, 0, wxEXPAND|wxALL, 5 );
	
	
	optionsSizer->Add( orientationSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
	
	wxBoxSizer* mirrorSizer;
	mirrorSizer = new wxBoxSizer( wxHORIZONTAL );
	
	
	wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") };
	wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") };
	int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString );
	int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString );
@@ -55,10 +60,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
	mirrorRadioBox->SetSelection( 0 );
	mirrorRadioBox->SetSelection( 0 );
	mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
	mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
	
	
	mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
	optionsSizer->Add( mirrorRadioBox, 0, wxALL|wxEXPAND, 5 );
	
	
	optionsSizer->Add( mirrorSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
	
	
	m_staticTextChipname = new wxStaticText( this, wxID_ANY, _("Chip Name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextChipname = new wxStaticText( this, wxID_ANY, _("Chip Name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextChipname->Wrap( -1 );
	m_staticTextChipname->Wrap( -1 );
@@ -73,19 +75,24 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
	convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 );
	convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 );
	convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );
	convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );
	
	
	optionsSizer->Add( convertCheckBox, 0, wxALL, 8 );
	optionsSizer->Add( convertCheckBox, 0, wxALL, 5 );
	
	partsAreLockedLabel = new wxStaticText( this, wxID_ANY, _("Parts are locked"), wxDefaultPosition, wxDefaultSize, 0 );
	partsAreLockedLabel->Wrap( -1 );
	optionsSizer->Add( partsAreLockedLabel, 0, wxALL|wxEXPAND, 8 );
	
	
	defaultsButton = new wxButton( this, wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
	defaultsButton = new wxButton( this, wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
	defaultsButton->SetToolTip( _("Set position and style of fields and component orientation  to default lib value.\nFields texts are not modified.") );
	defaultsButton->SetToolTip( _("Set position and style of fields and component orientation  to default lib value.\nFields texts are not modified.") );
	
	
	optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
	optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
	
	
	m_staticTextTimeStamp = new wxStaticText( this, wxID_ANY, _("Timestamp"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextTimeStamp->Wrap( -1 );
	optionsSizer->Add( m_staticTextTimeStamp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_textCtrlTimeStamp = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	m_textCtrlTimeStamp->SetToolTip( _("An unique ID (a time stamp) to identify the component.\nThis is an alternate identifier to the reference.") );
	
	optionsSizer->Add( m_textCtrlTimeStamp, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
	
	
	
	upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
	upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxEXPAND|wxALL, 5 );
	
	
	wxStaticBoxSizer* fieldsSizer;
	wxStaticBoxSizer* fieldsSizer;
	fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL );
	fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL );
@@ -265,7 +272,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
	stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
	stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
	stdDialogButtonSizer->Realize();
	stdDialogButtonSizer->Realize();
	
	
	mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
	mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 5 );
	
	
	
	
	this->SetSizer( mainSizer );
	this->SetSizer( mainSizer );
+354 −106

File changed.

Preview size limit exceeded, changes collapsed.

+6 −3
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// C++ code generated with wxFormBuilder (version Nov  6 2013)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -21,8 +21,8 @@ class DIALOG_SHIM;
#include <wx/colour.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/settings.h>
#include <wx/choice.h>
#include <wx/choice.h>
#include <wx/radiobox.h>
#include <wx/sizer.h>
#include <wx/sizer.h>
#include <wx/radiobox.h>
#include <wx/textctrl.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/button.h>
@@ -43,13 +43,16 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
	protected:
	protected:
		wxStaticText* m_staticTextUnit;
		wxStaticText* m_staticTextUnit;
		wxChoice* unitChoice;
		wxChoice* unitChoice;
		wxStaticText* unitsInterchageableText;
		wxStaticText* unitsInterchageableLabel;
		wxRadioBox* orientationRadioBox;
		wxRadioBox* orientationRadioBox;
		wxRadioBox* mirrorRadioBox;
		wxRadioBox* mirrorRadioBox;
		wxStaticText* m_staticTextChipname;
		wxStaticText* m_staticTextChipname;
		wxTextCtrl* chipnameTextCtrl;
		wxTextCtrl* chipnameTextCtrl;
		wxCheckBox* convertCheckBox;
		wxCheckBox* convertCheckBox;
		wxStaticText* partsAreLockedLabel;
		wxButton* defaultsButton;
		wxButton* defaultsButton;
		wxStaticText* m_staticTextTimeStamp;
		wxTextCtrl* m_textCtrlTimeStamp;
		wxListCtrl* fieldListCtrl;
		wxListCtrl* fieldListCtrl;
		wxButton* addFieldButton;
		wxButton* addFieldButton;
		wxButton* deleteFieldButton;
		wxButton* deleteFieldButton;
+1280 −891

File changed.

Preview size limit exceeded, changes collapsed.

Loading