Commit 12472644 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio

Added layer change to the module text dialog (both user text and reference/value)

Since reference and value are not anymore always on silk changed the label on the corresponding options in the plot dialog
The 'proper Gerber extensions' was renamed in dialog as 'Protel Gerberl extensions': I don't know if it was a typo/misunderstanding or what but the proper extension is gbr; the set of alternative extensions seems to be the one used by Protel/Altium.
parent 0da38e5b
......@@ -155,6 +155,19 @@ void DialogEditModuleText::initDlg( )
if( !m_currentText->IsVisible() )
m_Show->SetSelection( 1 );;
// Configure the layers list selector
m_LayerSelectionCtrl->SetLayersHotkeys( false );
m_LayerSelectionCtrl->SetLayerSet( LSET::InternalCuMask().set( Edge_Cuts ) );
m_LayerSelectionCtrl->SetBoardFrame( m_parent );
m_LayerSelectionCtrl->Resync();
if( m_LayerSelectionCtrl->SetLayerSelection( m_currentText->GetLayer() ) < 0 )
{
wxMessageBox( _( "This item has an illegal layer id.\n"
"Now, forced on the front silk screen layer. Please, fix it" ) );
m_LayerSelectionCtrl->SetLayerSelection( F_SilkS );
}
}
......@@ -162,7 +175,7 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
{
wxString msg;
if ( m_module)
if( m_module )
m_parent->SaveCopyInUndoList( m_module, UR_CHANGED );
#ifndef USE_WX_OVERLAY
......@@ -223,6 +236,9 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
m_currentText->SetDrawCoord();
LAYER_NUM layer = m_LayerSelectionCtrl->GetLayerSelection();
m_currentText->SetLayer( ToLAYER_ID( layer ) );
#ifndef USE_WX_OVERLAY
if( m_dc ) // Display new text
{
......
......@@ -32,7 +32,7 @@ DialogEditModuleText_base::DialogEditModuleText_base( wxWindow* parent, wxWindow
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 6, 2, 0, 0 );
fgSizer1 = new wxFlexGridSizer( 7, 2, 0, 0 );
fgSizer1->AddGrowableCol( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
......@@ -85,6 +85,13 @@ DialogEditModuleText_base::DialogEditModuleText_base( wxWindow* parent, wxWindow
m_TxtPosCtrlY->SetMaxLength( 0 );
fgSizer1->Add( m_TxtPosCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerLabel->Wrap( -1 );
fgSizer1->Add( m_LayerLabel, 0, wxALL, 5 );
m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
fgSizer1->Add( m_LayerSelectionCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizer10->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 );
......
......@@ -11,8 +11,7 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "class_pcb_layer_box_selector.h"
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
......@@ -22,6 +21,7 @@ class DIALOG_SHIM;
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/textctrl.h>
#include <wx/bmpcbox.h>
#include <wx/sizer.h>
#include <wx/radiobox.h>
#include <wx/button.h>
......@@ -51,6 +51,8 @@ class DialogEditModuleText_base : public DIALOG_SHIM
wxTextCtrl* m_TxtPosCtrlX;
wxStaticText* m_PosYTitle;
wxTextCtrl* m_TxtPosCtrlY;
wxStaticText* m_LayerLabel;
PCB_LAYER_BOX_SELECTOR* m_LayerSelectionCtrl;
wxRadioBox* m_Style;
wxRadioBox* m_Orient;
wxRadioBox* m_Show;
......
......@@ -7,7 +7,7 @@
* Circles
* Arcs
* used as graphic elements found on non copper layers in boards
* Footprint texts are not always graphic items and are not handled here
* Footprint texts are not graphic items and are not handled here
*/
#include <fctsys.h>
#include <macros.h>
......
......@@ -92,23 +92,23 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerPlotItems->Add( m_plotSheetRef, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotPads_on_Silkscreen = new wxCheckBox( this, ID_ALLOW_PRINT_PAD_ON_SILKSCREEN, _("Plot pads on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotPads_on_Silkscreen->SetToolTip( _("Enable/disable print/plot pads on silkscreen layers\nWhen disable, pads are never potted on silkscreen layers\nWhen enable, pads are potted only if they appear on silkscreen layers") );
m_plotPads_on_Silkscreen->SetToolTip( _("Enable plotting of pads on silkscreen layers\nWhen disabled, pads are never plotted on silkscreen layers\nWhen enabled, pads are plotted only if they appear on silkscreen layers") );
bSizerPlotItems->Add( m_plotPads_on_Silkscreen, 0, wxALL, 2 );
m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module value on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotModuleValueOpt = new wxCheckBox( this, wxID_ANY, _("Plot module values"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerPlotItems->Add( m_plotModuleValueOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module reference on silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotModuleRefOpt = new wxCheckBox( this, ID_PRINT_REF, _("Plot module references"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerPlotItems->Add( m_plotModuleRefOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Force plot invisible values/refrences"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotInvisibleText->SetToolTip( _("Force plot invisible values and/or references") );
m_plotInvisibleText = new wxCheckBox( this, wxID_ANY, _("Force plot invisible values/references"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotInvisibleText->SetToolTip( _("Force plotting of invisible values and/or references") );
bSizerPlotItems->Add( m_plotInvisibleText, 0, wxALL, 2 );
m_plotNoViaOnMaskOpt = new wxCheckBox( this, wxID_ANY, _("Do not tent vias"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias.") );
m_plotNoViaOnMaskOpt->SetToolTip( _("Remove soldermask on vias") );
bSizerPlotItems->Add( m_plotNoViaOnMaskOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
......@@ -124,7 +124,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerPlotItems->Add( m_plotPSNegativeOpt, 0, wxALL, 2 );
m_useAuxOriginCheckBox = new wxCheckBox( this, wxID_ANY, _("Use auxiliary axis as origin"), wxDefaultPosition, wxDefaultSize, 0 );
m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in Gerber files.") );
m_useAuxOriginCheckBox->SetToolTip( _("Use auxiliary axis as coordinates origin in plot files") );
bSizerPlotItems->Add( m_useAuxOriginCheckBox, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
......@@ -205,7 +205,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_solderMaskMinWidthLabel = new wxStaticText( this, wxID_ANY, _("Solder mask min width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_solderMaskMinWidthLabel->Wrap( -1 );
m_solderMaskMinWidthLabel->SetToolTip( _("Min dist between 2 pad areas.\nTwo pad areas nearer than this value will be merged during plotting") );
m_solderMaskMinWidthLabel->SetToolTip( _("Minimum distance between 2 pad areas.\nTwo pad areas nearer than this value will be merged during plotting") );
fgSizerSoldMaskOpts->Add( m_solderMaskMinWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
......@@ -224,8 +224,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
wxBoxSizer* bSizerGbrOpt;
bSizerGbrOpt = new wxBoxSizer( wxVERTICAL );
m_useGerberExtensions = new wxCheckBox( this, wxID_ANY, _("Use proper filename extensions"), wxDefaultPosition, wxDefaultSize, 0 );
m_useGerberExtensions->SetToolTip( _("Use proper Gerber extensions - .GBL, .GTL, etc...") );
m_useGerberExtensions = new wxCheckBox( this, wxID_ANY, _("Use Protel filename extensions"), wxDefaultPosition, wxDefaultSize, 0 );
m_useGerberExtensions->SetToolTip( _("Use conventional Protel Gerber extensions - .GBL, .GTL, etc...") );
bSizerGbrOpt->Add( m_useGerberExtensions, 0, wxALL, 2 );
......@@ -246,7 +246,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
int m_rbGerberFormatNChoices = sizeof( m_rbGerberFormatChoices ) / sizeof( wxString );
m_rbGerberFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbGerberFormatNChoices, m_rbGerberFormatChoices, 1, wxRA_SPECIFY_COLS );
m_rbGerberFormat->SetSelection( 0 );
m_rbGerberFormat->SetToolTip( _("Precision of coordinates in Gerber files.\nUse the highter value if possible.") );
m_rbGerberFormat->SetToolTip( _("Resolution of coordinates in Gerber files.\nUse the higher value if possible") );
m_GerberOptionsSizer->Add( m_rbGerberFormat, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment