Compare commits

...

27 Commits

Author SHA1 Message Date
Wayne Stambaugh c3dc1f65d4 Tag release version 5.1.4. 2019-08-04 12:36:25 -04:00
Wayne Stambaugh 238fb00727 Revert "Eeschema: fix many append schematic bugs."
This reverts commit 3518153d5b.
2019-08-04 12:34:25 -04:00
Wayne Stambaugh 2d48c81d58 Revert "Eeschema: fix edit sheet bug."
This reverts commit 6051dfae30.
2019-08-04 12:33:55 -04:00
Wayne Stambaugh 0893e0043f Revert "Eeschema: remove rogue symbol libraries from project file."
This reverts commit 5d60fe6812.
2019-08-04 12:33:19 -04:00
Jeff Young 72c0267fe6 Ativate delete tool so it can display the selection clarification menu when needed.
Fixes: lp:1835371
* https://bugs.launchpad.net/kicad/+bug/1835371

(cherry picked from commit c60118b6a4)
2019-08-03 22:49:27 -06:00
Seth Hillbrand c9956def36 pcbnew: Fix copy-paste error from 161dc9ce7
create_vrml_shell() needed the idxSide check but create_vrml_plane only
had an extra variable that wasn't used and so shouldn't be checked.
2019-08-02 13:14:02 -07:00
Wayne Stambaugh 5d60fe6812 Eeschema: remove rogue symbol libraries from project file.
Check for symbol libraries that somehow ended up in the project file
after remapping occurred and remove all of them to prevent potentially
broken symbol library links.

Add nagware dialog to warn the user and a checkbox to never show the
dialog again.

Fixes lp:1838185

https://bugs.launchpad.net/kicad/+bug/1838185
(cherry picked from commit 8789ab9265)
2019-08-01 15:24:55 -04:00
Wayne Stambaugh 6051dfae30 Eeschema: fix edit sheet bug.
Remove an existing sheet from the current page that requires a schematic
load from file to prevent a corrupt screen list from causing a segfault.

Merge the edit sheet file loading with the append schematic code since
they are functionally the same.  This allows the sheet edit code to
take advantage of all of the added broken symbol library links added in
the recent append schematic fixes.

Fixes lp:1835841

https://bugs.launchpad.net/kicad/+bug/1835841
(cherry picked from commit b595dc0d3b)
2019-08-01 15:24:55 -04:00
Wayne Stambaugh 3518153d5b Eeschema: fix many append schematic bugs.
Do not add cache library from another project to old library list.  This
is wrong and can cause all kinds of symbol library linking issues.  It's
better to force the user to fix broken symbol library links than the false
security of using multiple cache libraries.

Use correct paths when appending schematic outside of the current project
path when hierarchical sheets are appended.  If the path can be relative,
give the user the option to use either relative or absolute paths.

Do not change symbol library names in schematics appended from a source
outside the current project.  This will almost ensure the symbol library
links will be broken in the source project.

When the appended schematic is from another project, attempt to check all
of the possible combinations of symbol library table importing that could
cause broken symbol library links and give the user the option of canceling
the append operation or live with the possibility that there may be broken
symbol library links.

When the append schematic is in the current project path but not part of
the schematic, check to see if there are any library nicknames that do
no exist in the project symbol library table and give the user a chance
to cancel the append process.

(cherry picked from commit 9fae30162d)
2019-08-01 15:24:55 -04:00
Seth Hillbrand cf949609b2 eeschema: Properly map edge cases of legacy onto GAL
While we do not generate these arcs internally, some external tools
generate arcs that are technically valid but display correctly only
because of an oddity in the degeneracy mapping.

Fixes: lp:1838557
* https://bugs.launchpad.net/kicad/+bug/1838557
2019-08-01 11:45:10 -07:00
Jeff Young d482a8805c Perform better cleanup after cancelling text placement.
Fixes: lp:1838452
* https://bugs.launchpad.net/kicad/+bug/1838452
2019-07-31 23:17:08 -06:00
Seth Hillbrand 161dc9ce7e pcbnew: Fix VRML export checking
In rare cases, the VRML triangulator may claim to work but return empty
vectors.  These cases need to be caught before we dereference the vector
elements.

Fixes: lp:1838448
* https://bugs.launchpad.net/kicad/+bug/1838448
2019-07-31 20:03:49 -07:00
jean-pierre charras 090073cc3b Pcbnew, exchange footprints: fix a bug that prevent the new footprint to be at the right place.
Fixes: lp:1838446
https://bugs.launchpad.net/kicad/+bug/1838446
2019-07-31 12:07:49 +02:00
Ian McInerney 6ae718e4d6 pcbnew: Fix DXF units in drill map plotting
Fixes: lp:1836924
* https://bugs.launchpad.net/kicad/+bug/1836924

(cherry picked from commit 6c401ecce7)
2019-07-30 17:20:38 -04:00
Thomas Pointhuber 783b1cb611 Fix handling of filled circle in eagle importer (was only partly fixed)
Partly fixed in 4fc692f04b, but missed
that there is a loadPlain where I need to handle this case as well.

(cherry picked from commit 5f438b7a85)
2019-07-30 15:33:39 -04:00
Jeff Young 4b01f80e8d Fix typo in cherry-pick.
Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-30 11:49:06 -06:00
Jeff Young c8278f377b Alternative to cherry-picking b70df18939.
Fixes: lp:1838158
* https://bugs.launchpad.net/kicad/+bug/1838158
2019-07-29 20:19:46 -06:00
jean-pierre charras d34b664933 Simulation: do not add .save V(0) and/or .save V(GND) to ngspice.
These 2 nets are internally added by ngspice (info from Holger Vogt)

(cherry picked from commit d92396341e)
2019-07-28 04:52:57 -07:00
jean-pierre charras c8f40e1d26 PANEL_SETUP_NETCLASSES_BASE: fix minor wxAlert. 2019-07-28 13:26:58 +02:00
jean-pierre charras 185a8d7582 Try to fix UI issues in select layer pair dialog and slect layer dialog.
Fixes: lp:1838173
https://bugs.launchpad.net/kicad/+bug/1838173
2019-07-28 12:55:47 +02:00
jean-pierre charras 8373e91a1b Python scripting: fix missing definition of uint32_t (and some other similar defs).
Fixes: lp:1837867
https://bugs.launchpad.net/kicad/+bug/1837867
2019-07-27 08:22:10 +02:00
Jeff Young 6aeedfb70c Partial cherry-pick of 3904d7ccfc.
Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-26 20:46:12 -06:00
Stefan Hamminga e7f3851212 Rebased LTO fix for coroutines
Fixes: lp:1793329
* https://bugs.launchpad.net/kicad/+bug/1793329

(cherry picked from commit e58d9606dd)
2019-07-25 12:17:11 -07:00
jean-pierre charras 7df05ade4c Pcbnew: Fix bug in MODULE::FindPadByName( const wxString& aPadName ). This method was using a case insensitive comparison to find the pad matching aPadName. But in netlist we are using case sensitive comparisons to attribute a net to a pad. So if in the netlist there is a pad name that does not match any footprint pad name using case sensitive comparison but if it matches some pads using case insensitive comparison, the net is not set, but the test to detect non existing pads fails. 2019-07-25 17:57:38 +02:00
Seth Hillbrand 24b032ce5b Project Templates: Allow multiple line titles
This fixes two display issues in the project template selector.  The
first captured HTML tags in the template title display and the second
prevented more than one line for showing (at least on GTK) in the
preview.  This prevented disambiguation between the various templates.
2019-07-23 15:05:25 -07:00
Seth Hillbrand b6fe4ff637 eeschema: Clean up backup name
This fixes the last suffix that was missed by 168fa09f5.  The schematic
backup files should have the suffix .sch-bak to distinguish from
.kicad_pcb-bak or other backups.
2019-07-23 10:47:15 -07:00
Wayne Stambaugh 8f1aa28b37 Begin version 5.1.4 development. 2019-07-23 08:16:06 -04:00
29 changed files with 332 additions and 593 deletions
+1 -1
View File
@@ -35,4 +35,4 @@
# be set after each version tag is added to the git repo. This will
# give developers a reasonable idea where which branch was used to build
# KiCad.
set( KICAD_VERSION "5.1.3" )
set( KICAD_VERSION "5.1.4" )
+8
View File
@@ -380,6 +380,14 @@ if( BUILD_GITHUB_PLUGIN )
)
endif()
# Link-time optimization (LTO) on GCC conflicts with embedded assembly (__asm),
# following GCC's recommendation to disable LTO per translation unit.
if( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties( system/libcontext.cpp PROPERTIES
COMPILE_FLAGS "-fno-lto"
)
endif()
set( COMMON_SRCS
${COMMON_SRCS}
system/libcontext.cpp
+1
View File
@@ -34,6 +34,7 @@
%include <std_map.i>
%include <std_shared_ptr.i>
%include <std_set.i>
%include <stdint.i>
%include "ki_exception.i" // affects all that follow it
-1
View File
@@ -91,7 +91,6 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
const std::string SchematicSymbolFileExtension( "sym" );
const std::string SchematicLibraryFileExtension( "lib" );
const std::string SchematicBackupFileExtension( "bak" );
const std::string VrmlFileExtension( "wrl" );
+2 -2
View File
@@ -94,8 +94,8 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, bool aSaveUnderNewName,
{
wxFileName backupFileName = schematicFileName;
// Rename the old file to a '.bak' one:
backupFileName.SetExt( SchematicBackupFileExtension );
// Rename the old file to a '-bak' suffixed one:
backupFileName.SetExt( schematicFileName.GetExt() + GetBackupSuffix() );
if( backupFileName.FileExists() )
wxRemoveFile( backupFileName.GetFullPath() );
+21 -2
View File
@@ -366,8 +366,27 @@ void SCH_PAINTER::draw( LIB_ARC *aArc, int aLayer )
int sai = aArc->GetFirstRadiusAngle();
int eai = aArc->GetSecondRadiusAngle();
if( TRANSFORM().MapAngles( &sai, &eai ) )
std::swap( sai, eai );
/**
* This accounts for an oddity in the old library format, where the symbol
* is overdefined. The previous draw (based on wxwidgets) used start point and end
* point and always drew counter-clockwise. The new GAL draw takes center, radius and
* start/end angles. All of these points were stored in the file, so we need to mimic the
* swapping of start/end points rather than using the stored angles in order to properly map
* edge cases.
*
* todo(v6): Remove this hack when we update the file format and do translation on loading.
*/
if( !TRANSFORM().MapAngles( &sai, &eai ) )
{
LIB_ARC new_arc( *aArc );
new_arc.SetStart( aArc->GetEnd() );
new_arc.SetEnd( aArc->GetStart() );
new_arc.CalcRadiusAngles();
sai = new_arc.GetFirstRadiusAngle();
eai = new_arc.GetSecondRadiusAngle();
TRANSFORM().MapAngles( &sai, &eai );
}
double sa = (double) sai * M_PI / 1800.0;
double ea = (double) eai * M_PI / 1800.0 ;
+8 -2
View File
@@ -187,8 +187,14 @@ void NETLIST_EXPORTER_PSPICE_SIM::writeDirectives( OUTPUTFORMATTER* aFormatter,
// If we print out .save directives for currents, then it needs to be done for voltages as well
for( const auto& netMap : GetNetIndexMap() )
{
aFormatter->Print( 0, ".save %s\n",
(const char*) GetSpiceVector( netMap.first, SPT_VOLTAGE ).c_str() );
// the "0" and the "GND" nets are automaticallly saved internally by ngspice.
// Skip them
wxString netname = GetSpiceVector( netMap.first, SPT_VOLTAGE );
if( netname == "V(0)" || netname == "V(GND)" )
continue;
aFormatter->Print( 0, ".save %s\n", (const char*) netname.c_str() );
}
if( m_simCommand.IsEmpty() )
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 1 2018)
// C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -102,7 +102,7 @@ TEMPLATE_SELECTION_PANEL_BASE::~TEMPLATE_SELECTION_PANEL_BASE()
TEMPLATE_WIDGET_BASE::TEMPLATE_WIDGET_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
this->SetMinSize( wxSize( 74,-1 ) );
this->SetMinSize( wxSize( 74,150 ) );
this->SetMaxSize( wxSize( 74,-1 ) );
wxBoxSizer* bSizer4;
@@ -14,6 +14,7 @@
<property name="file">dialog_template_selector_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">DIALOG_TEMPLATE_SELECTOR_BASE</property>
@@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@@ -644,7 +646,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size">74,-1</property>
<property name="minimum_size">74,-1</property>
<property name="minimum_size">74,150</property>
<property name="name">TEMPLATE_WIDGET_BASE</property>
<property name="pos"></property>
<property name="size">74,118</property>
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 1 2018)
// C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+10 -16
View File
@@ -253,27 +253,25 @@ wxString* PROJECT_TEMPLATE::GetTitle(void)
while( input.IsOk() && !input.Eof() && !done )
{
wxString line = text.ReadLine();
wxString upperline = line.Clone().Upper();
start = line.Find( wxT( "<title>" ) );
if( start == wxNOT_FOUND )
start = line.Find( wxT( "<TITLE>" ) );
finish = line.Find( wxT( "</title>" ) );
if( finish == wxNOT_FOUND )
finish = line.Find( wxT( "</TITLE>" ) );
start = upperline.Find( wxT( "<TITLE>" ) );
finish = upperline.Find( wxT( "</TITLE>" ) );
int length = finish - start - 7;
// find the opening tag
if( start != wxNOT_FOUND )
{
if( finish != wxNOT_FOUND )
{
title = line.SubString( start + 7, finish );
title = line( start + 7, length );
}
else
{
title = line.SubString( start + 7, line.Len() - 1 );
done = true;
title = line.Mid( start + 7 );
}
done = true;
}
else
{
@@ -282,15 +280,11 @@ wxString* PROJECT_TEMPLATE::GetTitle(void)
title += line.SubString( 0, finish );
done = true;
}
else
{
title += line;
}
}
// Remove line endings
title.Replace( wxT( "\r" ), wxT( "" ) );
title.Replace( wxT( "\n" ), wxT( "" ) );
title.Replace( wxT( "\r" ), wxT( " " ) );
title.Replace( wxT( "\n" ), wxT( " " ) );
}
}
+1 -1
View File
@@ -680,7 +680,7 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const
{
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
if( pad->GetName().CmpNoCase( aPadName ) == 0 ) // why case insensitive?
if( pad->GetName() == aPadName )
return pad;
}
@@ -419,6 +419,10 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT&
* when all modules are on board */
PlaceModule( aDest, nullptr, false );
// Copy full placement, locked flag and pad net names (when possible) but not local
// settings like clearances (use library values)
aDest->SetPosition( aSrc->GetPosition() );
if( aDest->GetLayer() != aSrc->GetLayer() )
aDest->Flip( aSrc->GetPosition() );
+43
View File
@@ -33,6 +33,7 @@
#include <class_board.h>
#include <class_module.h>
#include <class_marker_pcb.h>
#include <class_pcb_text.h>
#include <pcbnew.h>
#include <pcbnew_id.h>
@@ -125,6 +126,48 @@ void DIALOG_FIND::onButtonFindItemClick( wxCommandEvent& aEvent )
break;
}
}
for( BOARD_ITEM* item : module->GraphicalItems() )
{
if( item->Type() != PCB_MODULE_TEXT_T )
continue;
TEXTE_MODULE* textItem = static_cast<TEXTE_MODULE*>( item );
if( WildCompareString( searchString, textItem->GetShownText().GetData(), false ) )
{
count++;
if( count > itemCount )
{
foundItem = module;
pos = module->GetPosition();
itemCount++;
break;
}
}
}
}
for( BOARD_ITEM* item : parent->GetBoard()->Drawings() )
{
if( item->Type() != PCB_TEXT_T )
continue;
TEXTE_PCB* textItem = static_cast<TEXTE_PCB*>( item );
if( WildCompareString( searchString, textItem->GetShownText().GetData(), false ) )
{
count++;
if( count > itemCount )
{
foundItem = textItem;
pos = textItem->GetPosition();
itemCount++;
break;
}
}
}
wxString msg;
+74 -80
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -9,25 +9,25 @@
///////////////////////////////////////////////////////////////////////////
DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerUpper;
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_leftGridLayers->CreateGrid( 1, 3 );
m_leftGridLayers->EnableEditing( false );
m_leftGridLayers->EnableGridLines( false );
m_leftGridLayers->EnableDragGridSize( false );
m_leftGridLayers->SetMargins( 5, 3 );
// Columns
m_leftGridLayers->SetColSize( 0, 24 );
m_leftGridLayers->SetColSize( 1, 20 );
@@ -35,30 +35,28 @@ DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWi
m_leftGridLayers->EnableDragColMove( false );
m_leftGridLayers->EnableDragColSize( false );
m_leftGridLayers->SetColLabelSize( 0 );
m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
m_leftGridLayers->EnableDragRowSize( false );
m_leftGridLayers->SetRowLabelSize( 0 );
m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Label Appearance
m_leftGridLayers->SetLabelBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
// Cell Defaults
m_leftGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
bSizerUpper->Add( m_leftGridLayers, 1, wxALL|wxEXPAND, 5 );
m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_rightGridLayers->CreateGrid( 1, 3 );
m_rightGridLayers->EnableEditing( false );
m_rightGridLayers->EnableGridLines( false );
m_rightGridLayers->EnableDragGridSize( false );
m_rightGridLayers->SetMargins( 5, 3 );
// Columns
m_rightGridLayers->SetColSize( 0, 24 );
m_rightGridLayers->SetColSize( 1, 20 );
@@ -66,30 +64,29 @@ DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWi
m_rightGridLayers->EnableDragColMove( false );
m_rightGridLayers->EnableDragColSize( false );
m_rightGridLayers->SetColLabelSize( 0 );
m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
m_rightGridLayers->EnableDragRowSize( false );
m_rightGridLayers->SetRowLabelSize( 0 );
m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Label Appearance
// Cell Defaults
m_rightGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
bSizerUpper->Add( m_rightGridLayers, 1, wxALL|wxEXPAND, 5 );
bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 10 );
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
this->Centre( wxBOTH );
// Connect Events
m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
m_leftGridLayers->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
@@ -104,35 +101,35 @@ DIALOG_LAYER_SELECTION_BASE::~DIALOG_LAYER_SELECTION_BASE()
m_leftGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
m_rightGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
}
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerUpper;
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerLeft;
bSizerLeft = new wxBoxSizer( wxVERTICAL );
m_staticTextTopLayer = new wxStaticText( this, wxID_ANY, _("Top/Front layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTopLayer->Wrap( -1 );
bSizerLeft->Add( m_staticTextTopLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_leftGridLayers->CreateGrid( 1, 3 );
m_leftGridLayers->EnableEditing( false );
m_leftGridLayers->EnableGridLines( false );
m_leftGridLayers->EnableDragGridSize( false );
m_leftGridLayers->SetMargins( 3, 3 );
// Columns
m_leftGridLayers->SetColSize( 0, 24 );
m_leftGridLayers->SetColSize( 1, 20 );
@@ -140,40 +137,38 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
m_leftGridLayers->EnableDragColMove( false );
m_leftGridLayers->EnableDragColSize( false );
m_leftGridLayers->SetColLabelSize( 0 );
m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
m_leftGridLayers->EnableDragRowSize( false );
m_leftGridLayers->SetRowLabelSize( 0 );
m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Label Appearance
m_leftGridLayers->SetLabelBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
// Cell Defaults
m_leftGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bSizerUpper->Add( bSizerLeft, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxEXPAND, 5 );
bSizerUpper->Add( bSizerLeft, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
m_staticTextBottomLayer = new wxStaticText( this, wxID_ANY, _("Bottom/Back layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBottomLayer->Wrap( -1 );
bSizerRight->Add( m_staticTextBottomLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_rightGridLayers->CreateGrid( 1, 3 );
m_rightGridLayers->EnableEditing( false );
m_rightGridLayers->EnableGridLines( false );
m_rightGridLayers->EnableDragGridSize( false );
m_rightGridLayers->SetMargins( 3, 3 );
// Columns
m_rightGridLayers->SetColSize( 0, 24 );
m_rightGridLayers->SetColSize( 1, 20 );
@@ -181,45 +176,44 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
m_rightGridLayers->EnableDragColMove( false );
m_rightGridLayers->EnableDragColSize( false );
m_rightGridLayers->SetColLabelSize( 0 );
m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
m_rightGridLayers->EnableDragRowSize( false );
m_rightGridLayers->SetRowLabelSize( 0 );
m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Label Appearance
// Cell Defaults
m_rightGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bSizerUpper->Add( bSizerRight, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( bSizerUpper, 0, wxALL|wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxEXPAND, 5 );
bSizerUpper->Add( bSizerRight, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( bSizerUpper, 1, wxALL|wxEXPAND, 5 );
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 );
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
this->Centre( wxBOTH );
// Connect Events
m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
m_rightGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
@@ -230,5 +224,5 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::~DIALOG_COPPER_LAYER_PAIR_SELECTION_BAS
// Disconnect Events
m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
}
+39 -397
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="13" />
<FileVersion major="1" minor="15" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@@ -14,6 +14,8 @@
<property name="file">dialog_layer_selection_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_layer_selection_base</property>
<property name="namespace"></property>
@@ -24,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@@ -46,48 +49,12 @@
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
<property name="title">Select Layer</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerMain</property>
@@ -121,17 +88,17 @@
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="cell_bg">wxSYS_COLOUR_MENU</property>
<property name="cell_bg"></property>
<property name="cell_font"></property>
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_TOP</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="col_label_size">0</property>
<property name="col_label_values"></property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">3</property>
<property name="column_sizes">24,20,72</property>
<property name="context_help"></property>
@@ -154,7 +121,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_LEFT_LIST</property>
<property name="label_bg">wxSYS_COLOUR_WINDOW</property>
<property name="label_bg"></property>
<property name="label_font"></property>
<property name="label_text"></property>
<property name="margin_height">3</property>
@@ -174,10 +141,10 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property>
<property name="rows">1</property>
<property name="show">1</property>
@@ -188,61 +155,8 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnGridCellChange"></event>
<event name="OnGridCellLeftClick">OnLeftGridCellClick</event>
<event name="OnGridCellLeftDClick"></event>
<event name="OnGridCellRightClick"></event>
<event name="OnGridCellRightDClick"></event>
<event name="OnGridCmdCellChange"></event>
<event name="OnGridCmdCellLeftClick"></event>
<event name="OnGridCmdCellLeftDClick"></event>
<event name="OnGridCmdCellRightClick"></event>
<event name="OnGridCmdCellRightDClick"></event>
<event name="OnGridCmdColSize"></event>
<event name="OnGridCmdEditorCreated"></event>
<event name="OnGridCmdEditorHidden"></event>
<event name="OnGridCmdEditorShown"></event>
<event name="OnGridCmdLabelLeftClick"></event>
<event name="OnGridCmdLabelLeftDClick"></event>
<event name="OnGridCmdLabelRightClick"></event>
<event name="OnGridCmdLabelRightDClick"></event>
<event name="OnGridCmdRangeSelect"></event>
<event name="OnGridCmdRowSize"></event>
<event name="OnGridCmdSelectCell"></event>
<event name="OnGridColSize"></event>
<event name="OnGridEditorCreated"></event>
<event name="OnGridEditorHidden"></event>
<event name="OnGridEditorShown"></event>
<event name="OnGridLabelLeftClick"></event>
<event name="OnGridLabelLeftDClick"></event>
<event name="OnGridLabelRightClick"></event>
<event name="OnGridLabelRightDClick"></event>
<event name="OnGridRangeSelect"></event>
<event name="OnGridRowSize"></event>
<event name="OnGridSelectCell"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp">OnLeftButtonReleased</event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
@@ -264,17 +178,17 @@
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="cell_bg">wxSYS_COLOUR_MENU</property>
<property name="cell_bg"></property>
<property name="cell_font"></property>
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_TOP</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="col_label_size">0</property>
<property name="col_label_values"></property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">3</property>
<property name="column_sizes">24,20,72</property>
<property name="context_help"></property>
@@ -317,10 +231,10 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property>
<property name="rows">1</property>
<property name="show">1</property>
@@ -331,61 +245,8 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnGridCellChange"></event>
<event name="OnGridCellLeftClick">OnRightGridCellClick</event>
<event name="OnGridCellLeftDClick"></event>
<event name="OnGridCellRightClick"></event>
<event name="OnGridCellRightDClick"></event>
<event name="OnGridCmdCellChange"></event>
<event name="OnGridCmdCellLeftClick"></event>
<event name="OnGridCmdCellLeftDClick"></event>
<event name="OnGridCmdCellRightClick"></event>
<event name="OnGridCmdCellRightDClick"></event>
<event name="OnGridCmdColSize"></event>
<event name="OnGridCmdEditorCreated"></event>
<event name="OnGridCmdEditorHidden"></event>
<event name="OnGridCmdEditorShown"></event>
<event name="OnGridCmdLabelLeftClick"></event>
<event name="OnGridCmdLabelLeftDClick"></event>
<event name="OnGridCmdLabelRightClick"></event>
<event name="OnGridCmdLabelRightDClick"></event>
<event name="OnGridCmdRangeSelect"></event>
<event name="OnGridCmdRowSize"></event>
<event name="OnGridCmdSelectCell"></event>
<event name="OnGridColSize"></event>
<event name="OnGridEditorCreated"></event>
<event name="OnGridEditorHidden"></event>
<event name="OnGridEditorShown"></event>
<event name="OnGridLabelLeftClick"></event>
<event name="OnGridLabelLeftDClick"></event>
<event name="OnGridLabelRightClick"></event>
<event name="OnGridLabelRightDClick"></event>
<event name="OnGridRangeSelect"></event>
<event name="OnGridRowSize"></event>
<event name="OnGridSelectCell"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp">OnLeftButtonReleased</event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@@ -412,48 +273,12 @@
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
<property name="title">Select Copper Layer Pair</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerMain</property>
@@ -462,7 +287,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerUpper</property>
@@ -471,7 +296,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerLeft</property>
@@ -510,6 +335,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Top/Front layer:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -535,34 +361,11 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxGrid" expanded="1">
<property name="BottomDockable">1</property>
@@ -579,17 +382,17 @@
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="cell_bg">wxSYS_COLOUR_MENU</property>
<property name="cell_bg"></property>
<property name="cell_font"></property>
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_CENTRE</property>
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="col_label_size">0</property>
<property name="col_label_values"></property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">3</property>
<property name="column_sizes">24,20,72</property>
<property name="context_help"></property>
@@ -612,7 +415,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">ID_LEFT_LIST</property>
<property name="label_bg">wxSYS_COLOUR_WINDOW</property>
<property name="label_bg"></property>
<property name="label_font"></property>
<property name="label_text"></property>
<property name="margin_height">3</property>
@@ -632,10 +435,10 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property>
<property name="rows">1</property>
<property name="show">1</property>
@@ -646,61 +449,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnGridCellChange"></event>
<event name="OnGridCellLeftClick">OnLeftGridCellClick</event>
<event name="OnGridCellLeftDClick"></event>
<event name="OnGridCellRightClick"></event>
<event name="OnGridCellRightDClick"></event>
<event name="OnGridCmdCellChange"></event>
<event name="OnGridCmdCellLeftClick"></event>
<event name="OnGridCmdCellLeftDClick"></event>
<event name="OnGridCmdCellRightClick"></event>
<event name="OnGridCmdCellRightDClick"></event>
<event name="OnGridCmdColSize"></event>
<event name="OnGridCmdEditorCreated"></event>
<event name="OnGridCmdEditorHidden"></event>
<event name="OnGridCmdEditorShown"></event>
<event name="OnGridCmdLabelLeftClick"></event>
<event name="OnGridCmdLabelLeftDClick"></event>
<event name="OnGridCmdLabelRightClick"></event>
<event name="OnGridCmdLabelRightDClick"></event>
<event name="OnGridCmdRangeSelect"></event>
<event name="OnGridCmdRowSize"></event>
<event name="OnGridCmdSelectCell"></event>
<event name="OnGridColSize"></event>
<event name="OnGridEditorCreated"></event>
<event name="OnGridEditorHidden"></event>
<event name="OnGridEditorShown"></event>
<event name="OnGridLabelLeftClick"></event>
<event name="OnGridLabelLeftDClick"></event>
<event name="OnGridLabelRightClick"></event>
<event name="OnGridLabelRightDClick"></event>
<event name="OnGridRangeSelect"></event>
<event name="OnGridRowSize"></event>
<event name="OnGridSelectCell"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@@ -708,7 +457,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerRight</property>
@@ -747,6 +496,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Bottom/Back layer:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -772,34 +522,11 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxGrid" expanded="1">
<property name="BottomDockable">1</property>
@@ -816,17 +543,17 @@
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="cell_bg">wxSYS_COLOUR_MENU</property>
<property name="cell_bg"></property>
<property name="cell_font"></property>
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_CENTRE</property>
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="col_label_size">0</property>
<property name="col_label_values"></property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">3</property>
<property name="column_sizes">24,20,72</property>
<property name="context_help"></property>
@@ -869,10 +596,10 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property>
<property name="rows">1</property>
<property name="show">1</property>
@@ -883,61 +610,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnGridCellChange"></event>
<event name="OnGridCellLeftClick">OnRightGridCellClick</event>
<event name="OnGridCellLeftDClick"></event>
<event name="OnGridCellRightClick"></event>
<event name="OnGridCellRightDClick"></event>
<event name="OnGridCmdCellChange"></event>
<event name="OnGridCmdCellLeftClick"></event>
<event name="OnGridCmdCellLeftDClick"></event>
<event name="OnGridCmdCellRightClick"></event>
<event name="OnGridCmdCellRightDClick"></event>
<event name="OnGridCmdColSize"></event>
<event name="OnGridCmdEditorCreated"></event>
<event name="OnGridCmdEditorHidden"></event>
<event name="OnGridCmdEditorShown"></event>
<event name="OnGridCmdLabelLeftClick"></event>
<event name="OnGridCmdLabelLeftDClick"></event>
<event name="OnGridCmdLabelRightClick"></event>
<event name="OnGridCmdLabelRightDClick"></event>
<event name="OnGridCmdRangeSelect"></event>
<event name="OnGridCmdRowSize"></event>
<event name="OnGridCmdSelectCell"></event>
<event name="OnGridColSize"></event>
<event name="OnGridEditorCreated"></event>
<event name="OnGridEditorHidden"></event>
<event name="OnGridEditorShown"></event>
<event name="OnGridLabelLeftClick"></event>
<event name="OnGridLabelLeftDClick"></event>
<event name="OnGridLabelRightClick"></event>
<event name="OnGridLabelRightDClick"></event>
<event name="OnGridRangeSelect"></event>
<event name="OnGridRowSize"></event>
<event name="OnGridSelectCell"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@@ -983,7 +656,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="name">m_staticline</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@@ -1000,34 +673,11 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>
@@ -1041,14 +691,6 @@
<property name="minimum_size"></property>
<property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick"></event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
<event name="OnOKButtonClick"></event>
<event name="OnSaveButtonClick"></event>
<event name="OnYesButtonClick"></event>
</object>
</object>
</object>
+20 -21
View File
@@ -1,16 +1,16 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_LAYER_SELECTION_BASE_H__
#define __DIALOG_LAYER_SELECTION_BASE_H__
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "dialog_shim.h"
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
@@ -31,54 +31,53 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LAYER_SELECTION_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LAYER_SELECTION_BASE : public wxDialog
class DIALOG_LAYER_SELECTION_BASE : public DIALOG_SHIM
{
private:
protected:
wxGrid* m_leftGridLayers;
wxGrid* m_rightGridLayers;
// Virtual event handlers, overide them in your derived class
virtual void OnLeftGridCellClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnLeftButtonReleased( wxMouseEvent& event ) { event.Skip(); }
virtual void OnRightGridCellClick( wxGridEvent& event ) { event.Skip(); }
public:
DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Layer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Layer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LAYER_SELECTION_BASE();
};
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE : public wxDialog
class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE : public DIALOG_SHIM
{
private:
protected:
wxStaticText* m_staticTextTopLayer;
wxGrid* m_leftGridLayers;
wxStaticText* m_staticTextBottomLayer;
wxGrid* m_rightGridLayers;
wxStaticLine* m_staticline1;
wxStaticLine* m_staticline;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnLeftGridCellClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnRightGridCellClick( wxGridEvent& event ) { event.Skip(); }
public:
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Copper Layer Pair"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Copper Layer Pair"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE();
};
#endif //__DIALOG_LAYER_SELECTION_BASE_H__
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -237,10 +237,10 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
m_membershipPane->SetSizer( sbMembership );
m_membershipPane->Layout();
sbMembership->Fit( m_membershipPane );
bMargins->Add( m_membershipPane, 1, wxALIGN_BOTTOM|wxALL|wxEXPAND, 5 );
bMargins->Add( m_membershipPane, 1, wxALL|wxEXPAND, 5 );
bpanelNetClassesSizer->Add( bMargins, 1, wxALIGN_BOTTOM|wxALIGN_TOP|wxEXPAND|wxRIGHT, 5 );
bpanelNetClassesSizer->Add( bMargins, 1, wxALIGN_TOP|wxEXPAND|wxRIGHT, 5 );
this->SetSizer( bpanelNetClassesSizer );
@@ -14,6 +14,7 @@
<property name="file">panel_setup_netclasses_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">panel_setup_netclasses_base</property>
@@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1">
@@ -57,7 +59,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_BOTTOM|wxALIGN_TOP|wxEXPAND|wxRIGHT</property>
<property name="flag">wxALIGN_TOP|wxEXPAND|wxRIGHT</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
@@ -388,7 +390,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_BOTTOM|wxALL|wxEXPAND</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
@@ -470,7 +472,7 @@
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
@@ -606,7 +608,7 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="0">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
@@ -923,11 +925,11 @@
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0">
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer11</property>
<property name="orient">wxHORIZONTAL</property>
+1 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+12 -2
View File
@@ -645,12 +645,22 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
DRAWSEGMENT* dseg = new DRAWSEGMENT( m_board );
m_board->Add( dseg, ADD_APPEND );
int width = c.width.ToPcbUnits();
int radius = c.radius.ToPcbUnits();
// with == 0 means filled circle
if( width <= 0 )
{
width = radius;
radius = radius / 2;
}
dseg->SetShape( S_CIRCLE );
dseg->SetTimeStamp( EagleTimeStamp( gr ) );
dseg->SetLayer( layer );
dseg->SetStart( wxPoint( kicad_x( c.x ), kicad_y( c.y ) ) );
dseg->SetEnd( wxPoint( kicad_x( c.x + c.radius ), kicad_y( c.y ) ) );
dseg->SetWidth( c.width.ToPcbUnits() );
dseg->SetEnd( wxPoint( kicad_x( c.x ) + radius, kicad_y( c.y ) ) );
dseg->SetWidth( width );
}
m_xpath->pop();
}
+4 -4
View File
@@ -1700,9 +1700,8 @@ static void create_vrml_plane( IFSG_TRANSFORM& PcbOutput, VRML_COLOR_INDEX color
{
std::vector< double > vertices;
std::vector< int > idxPlane;
std::vector< int > idxSide;
if( !(*layer).Get2DTriangles( vertices, idxPlane, top_z, aTopPlane ) )
if( !( *layer ).Get2DTriangles( vertices, idxPlane, top_z, aTopPlane ) )
{
#ifdef DEBUG
do {
@@ -1716,7 +1715,7 @@ static void create_vrml_plane( IFSG_TRANSFORM& PcbOutput, VRML_COLOR_INDEX color
return;
}
if( ( idxPlane.size() % 3 ) || ( idxSide.size() % 3 ) )
if( ( idxPlane.size() % 3 ) )
{
#ifdef DEBUG
do {
@@ -1788,7 +1787,8 @@ static void create_vrml_shell( IFSG_TRANSFORM& PcbOutput, VRML_COLOR_INDEX color
bottom_z = tmp;
}
if( !(*layer).Get3DTriangles( vertices, idxPlane, idxSide, top_z, bottom_z ) )
if( !( *layer ).Get3DTriangles( vertices, idxPlane, idxSide, top_z, bottom_z )
|| idxPlane.empty() || idxSide.empty() )
{
#ifdef DEBUG
do {
@@ -144,6 +144,12 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName,
case PLOT_FORMAT_DXF:
{
DXF_PLOTTER* dxf_plotter = new DXF_PLOTTER;
if( m_unitsMetric )
dxf_plotter->SetUnits( DXF_PLOTTER::DXF_UNIT_MILLIMETERS );
else
dxf_plotter->SetUnits( DXF_PLOTTER::DXF_UNIT_INCHES );
plotter = dxf_plotter;
plotter->SetPageSettings( page_info );
plotter->SetViewport( offset, IU_PER_MILS/10, scale, false );
+7
View File
@@ -306,6 +306,13 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_Layers = nullptr;
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
m_previous_requested_scale = 0;
m_previous_active_layer_color = COLOR4D::UNSPECIFIED;
m_previous_Route_Layer_TOP_color = COLOR4D::UNSPECIFIED;
m_previous_Route_Layer_BOTTOM_color = COLOR4D::UNSPECIFIED;
m_previous_via_color = COLOR4D::UNSPECIFIED;
m_previous_background_color = COLOR4D::UNSPECIFIED;
// We don't know what state board was in when it was lasat saved, so we have to
// assume dirty
m_ZoneFillsDirty = true;
+8
View File
@@ -100,6 +100,14 @@ protected:
wxString m_lastNetListRead; ///< Last net list read with relative path.
// For PrepareLayerIndicator():
int m_previous_requested_scale;
COLOR4D m_previous_active_layer_color;
COLOR4D m_previous_Route_Layer_TOP_color;
COLOR4D m_previous_Route_Layer_BOTTOM_color;
COLOR4D m_previous_via_color;
COLOR4D m_previous_background_color;
// The Tool Framework initalization
void setupTools();
+20 -16
View File
@@ -1,29 +1,25 @@
/**
* @file sel_layer.cpp
* @brief dialogs for one layer selection and a layer pair selection.
* @brief minor dialogs for one layer selection and a layer pair selection.
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.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 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 3 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.
* 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
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -185,6 +181,10 @@ void PCB_ONE_LAYER_SELECTOR::buildList()
if( right_row <= 0 )
m_rightGridLayers->Show( false );
// Now fix min grid layer name column size (it also sets a minimal size)
m_leftGridLayers->AutoSizeColumn( LAYERNAME_COLNUM );
m_rightGridLayers->AutoSizeColumn( LAYERNAME_COLNUM );
}
@@ -351,6 +351,10 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList()
row++;
}
// Now fix min grid layer name column size (it also sets a minimal size)
m_leftGridLayers->AutoSizeColumn( LAYERNAME_COLNUM );
m_rightGridLayers->AutoSizeColumn( LAYERNAME_COLNUM );
}
+12 -17
View File
@@ -98,60 +98,55 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
Route_Layer_BOTTOM_color, via_color, background_color;
bool change = false;
static int previous_requested_scale;
static COLOR4D previous_active_layer_color, previous_Route_Layer_TOP_color,
previous_Route_Layer_BOTTOM_color, previous_via_color,
previous_background_color;
int requested_scale;
Pgm().CommonSettings()->Read( ICON_SCALE_KEY, &requested_scale, 0 );
if( requested_scale != previous_requested_scale )
if( requested_scale != m_previous_requested_scale )
{
previous_requested_scale = requested_scale;
m_previous_requested_scale = requested_scale;
change = true;
}
active_layer_color = Settings().Colors().GetLayerColor(GetActiveLayer());
if( previous_active_layer_color != active_layer_color )
if( m_previous_active_layer_color != active_layer_color )
{
previous_active_layer_color = active_layer_color;
m_previous_active_layer_color = active_layer_color;
change = true;
}
Route_Layer_TOP_color =
Settings().Colors().GetLayerColor( GetScreen()->m_Route_Layer_TOP );
if( previous_Route_Layer_TOP_color != Route_Layer_TOP_color )
if( m_previous_Route_Layer_TOP_color != Route_Layer_TOP_color )
{
previous_Route_Layer_TOP_color = Route_Layer_TOP_color;
m_previous_Route_Layer_TOP_color = Route_Layer_TOP_color;
change = true;
}
Route_Layer_BOTTOM_color =
Settings().Colors().GetLayerColor( GetScreen()->m_Route_Layer_BOTTOM );
if( previous_Route_Layer_BOTTOM_color != Route_Layer_BOTTOM_color )
if( m_previous_Route_Layer_BOTTOM_color != Route_Layer_BOTTOM_color )
{
previous_Route_Layer_BOTTOM_color = Route_Layer_BOTTOM_color;
m_previous_Route_Layer_BOTTOM_color = Route_Layer_BOTTOM_color;
change = true;
}
int via_type = GetDesignSettings().m_CurrentViaType;
via_color = Settings().Colors().GetItemColor( LAYER_VIAS + via_type );
if( previous_via_color != via_color )
if( m_previous_via_color != via_color )
{
previous_via_color = via_color;
m_previous_via_color = via_color;
change = true;
}
background_color = Settings().Colors().GetItemColor( LAYER_PCB_BACKGROUND );
if( previous_background_color != background_color )
if( m_previous_background_color != background_color )
{
previous_background_color = background_color;
m_previous_background_color = background_color;
change = true;
}
+12 -17
View File
@@ -379,6 +379,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
m_controls->SetAutoPan( false );
m_controls->CaptureCursor( false );
m_controls->ForceCursorPosition( false );
m_controls->ShowCursor( true );
}
else
@@ -444,23 +445,16 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
} );
if( textPcb->GetText().IsEmpty() )
{
m_controls->ForceCursorPosition( false );
delete textPcb;
}
else
text = textPcb;
}
if( text == NULL )
continue;
m_controls->WarpCursor( text->GetPosition(), true );
m_controls->ForceCursorPosition( false );
m_controls->CaptureCursor( true );
m_controls->SetAutoPan( true );
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, text );
if( text )
{
m_controls->WarpCursor( text->GetPosition(), true );
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, text );
}
}
else
{
@@ -470,12 +464,13 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
commit.Add( text );
commit.Push( _( "Place a text" ) );
m_controls->CaptureCursor( false );
m_controls->SetAutoPan( false );
m_controls->ShowCursor( true );
text = NULL;
text = nullptr;
}
m_controls->ForceCursorPosition( false );
m_controls->ShowCursor( true );
m_controls->CaptureCursor( text != nullptr );
m_controls->SetAutoPan( text != nullptr );
}
else if( text && evt->IsMotion() )
{
+1
View File
@@ -909,6 +909,7 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
return 1;
std::vector<BOARD_ITEM*> lockedItems;
Activate();
// get a copy instead of reference (as we're going to clear the selection before removing items)
SELECTION selectionCopy;