Minor fixes and changes:
Remove a minor warning message in Debug mode for 2 dialogs. Pcbnew: update Gerber X2 file format (File Attribute) to very last X2 specification Eeschema: Fix a minor bug in block selection (sometimes the last selected component was select instead of items in selected area) and better drag behavior when draging an item by the drag hotkey.
This commit is contained in:
parent
57e537699e
commit
1540368422
|
@ -71,6 +71,10 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
|
||||||
msg = _( "Block Drag" );
|
msg = _( "Block Drag" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case BLOCK_DRAG_ITEM: // Drag
|
||||||
|
msg = _( "Drag item" );
|
||||||
|
break;
|
||||||
|
|
||||||
case BLOCK_COPY: // Copy
|
case BLOCK_COPY: // Copy
|
||||||
msg = _( "Block Copy" );
|
msg = _( "Block Copy" );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -717,17 +717,18 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
|
||||||
case BLOCK_IDLE:
|
case BLOCK_IDLE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_MOVE: /* Move */
|
case BLOCK_MOVE: // Move
|
||||||
case BLOCK_DRAG: /* Drag */
|
case BLOCK_DRAG: // Drag (block defined)
|
||||||
case BLOCK_COPY: /* Copy */
|
case BLOCK_DRAG_ITEM: // Drag from a drag item command
|
||||||
case BLOCK_DELETE: /* Delete */
|
case BLOCK_COPY: // Copy
|
||||||
case BLOCK_SAVE: /* Save */
|
case BLOCK_DELETE: // Delete
|
||||||
case BLOCK_ROTATE: /* Rotate 90 deg */
|
case BLOCK_SAVE: // Save
|
||||||
case BLOCK_FLIP: /* Flip */
|
case BLOCK_ROTATE: // Rotate 90 deg
|
||||||
case BLOCK_ZOOM: /* Window Zoom */
|
case BLOCK_FLIP: // Flip
|
||||||
|
case BLOCK_ZOOM: // Window Zoom
|
||||||
case BLOCK_MIRROR_X:
|
case BLOCK_MIRROR_X:
|
||||||
case BLOCK_MIRROR_Y: /* mirror */
|
case BLOCK_MIRROR_Y: // mirror
|
||||||
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
case BLOCK_PRESELECT_MOVE: // Move with preselection list
|
||||||
Block->InitData( m_canvas, aPosition );
|
Block->InitData( m_canvas, aPosition );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -736,7 +737,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
|
||||||
Block->SetLastCursorPosition( wxPoint( 0, 0 ) );
|
Block->SetLastCursorPosition( wxPoint( 0, 0 ) );
|
||||||
InitBlockPasteInfos();
|
InitBlockPasteInfos();
|
||||||
|
|
||||||
if( Block->GetCount() == 0 ) /* No data to paste */
|
if( Block->GetCount() == 0 ) // No data to paste
|
||||||
{
|
{
|
||||||
DisplayError( this, wxT( "No Block to paste" ), 20 );
|
DisplayError( this, wxT( "No Block to paste" ), 20 );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE );
|
GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE );
|
||||||
|
@ -771,10 +772,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// See comment in classpcb.cpp near line 66
|
// I am not seeing a problem with this size yet:
|
||||||
//static const double MAX_AXIS = 1518500251;
|
|
||||||
|
|
||||||
// However I am not seeing a problem with this size yet:
|
|
||||||
static const double MAX_AXIS = INT_MAX - 100;
|
static const double MAX_AXIS = INT_MAX - 100;
|
||||||
|
|
||||||
#define VIRT_MIN (-MAX_AXIS/2.0) ///< min X or Y coordinate in virtual space
|
#define VIRT_MIN (-MAX_AXIS/2.0) ///< min X or Y coordinate in virtual space
|
||||||
|
|
|
@ -133,8 +133,9 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
|
|
||||||
switch( block->GetCommand() )
|
switch( block->GetCommand() )
|
||||||
{
|
{
|
||||||
case BLOCK_DRAG: /* Drag */
|
case BLOCK_DRAG: // Drag from mouse
|
||||||
case BLOCK_MOVE: /* Move */
|
case BLOCK_DRAG_ITEM: // Drag from a component selection and drag command
|
||||||
|
case BLOCK_MOVE:
|
||||||
if( m_canvas->IsMouseCaptured() )
|
if( m_canvas->IsMouseCaptured() )
|
||||||
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
|
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
|
||||||
|
|
||||||
|
@ -238,19 +239,24 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_DRAG:
|
case BLOCK_DRAG:
|
||||||
|
case BLOCK_DRAG_ITEM: // Drag from a drag command
|
||||||
GetScreen()->BreakSegmentsOnJunctions();
|
GetScreen()->BreakSegmentsOnJunctions();
|
||||||
// fall through
|
// fall through
|
||||||
|
|
||||||
case BLOCK_MOVE:
|
case BLOCK_MOVE:
|
||||||
case BLOCK_COPY:
|
case BLOCK_COPY:
|
||||||
if( GetScreen()->GetCurItem() != NULL )
|
if( block->GetCommand() == BLOCK_DRAG_ITEM &&
|
||||||
|
GetScreen()->GetCurItem() != NULL )
|
||||||
{
|
{
|
||||||
|
// This is a drag command, not a mouse block command
|
||||||
|
// Only this item is put in list
|
||||||
ITEM_PICKER picker;
|
ITEM_PICKER picker;
|
||||||
picker.SetItem( GetScreen()->GetCurItem() );
|
picker.SetItem( GetScreen()->GetCurItem() );
|
||||||
block->PushItem( picker );
|
block->PushItem( picker );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Collect all items in the locate block
|
||||||
GetScreen()->UpdatePickList();
|
GetScreen()->UpdatePickList();
|
||||||
}
|
}
|
||||||
// fall through
|
// fall through
|
||||||
|
|
|
@ -109,9 +109,10 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
||||||
DisplayError( this, wxT( "Error in HandleBlockPLace" ) );
|
DisplayError( this, wxT( "Error in HandleBlockPLace" ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_DRAG: /* Drag */
|
case BLOCK_DRAG:
|
||||||
case BLOCK_MOVE: /* Move */
|
case BLOCK_DRAG_ITEM:
|
||||||
case BLOCK_COPY: /* Copy */
|
case BLOCK_MOVE:
|
||||||
|
case BLOCK_COPY:
|
||||||
if ( m_component )
|
if ( m_component )
|
||||||
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
|
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
|
||||||
m_unit, m_convert,
|
m_unit, m_convert,
|
||||||
|
@ -132,7 +133,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
case BLOCK_PRESELECT_MOVE: // Move with preselection list
|
||||||
nextCmd = true;
|
nextCmd = true;
|
||||||
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
|
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
|
||||||
GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE );
|
GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE );
|
||||||
|
@ -232,8 +233,9 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
case BLOCK_IDLE:
|
case BLOCK_IDLE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_DRAG: /* Drag */
|
case BLOCK_DRAG:
|
||||||
case BLOCK_MOVE: /* Move */
|
case BLOCK_DRAG_ITEM:
|
||||||
|
case BLOCK_MOVE:
|
||||||
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
||||||
GetScreen()->m_BlockLocate.ClearItemsList();
|
GetScreen()->m_BlockLocate.ClearItemsList();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 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,7 +32,6 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
||||||
bSizeText = new wxBoxSizer( wxVERTICAL );
|
bSizeText = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||||
m_textLabelSingleLine->SetMaxLength( 0 );
|
|
||||||
m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
|
m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
|
||||||
|
|
||||||
bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
|
bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
|
||||||
|
@ -54,7 +53,6 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
||||||
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_TextSize->SetMaxLength( 0 );
|
|
||||||
bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
|
bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
|
||||||
|
|
||||||
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
|
@ -20,8 +20,10 @@
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header"></property>
|
<property name="precompiled_header"></property>
|
||||||
<property name="relative_path">1</property>
|
<property name="relative_path">1</property>
|
||||||
|
<property name="skip_lua_events">1</property>
|
||||||
<property name="skip_php_events">1</property>
|
<property name="skip_php_events">1</property>
|
||||||
<property name="skip_python_events">1</property>
|
<property name="skip_python_events">1</property>
|
||||||
|
<property name="ui_table">UI</property>
|
||||||
<property name="use_enum">1</property>
|
<property name="use_enum">1</property>
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Dialog" expanded="1">
|
<object class="Dialog" expanded="1">
|
||||||
|
@ -234,7 +236,7 @@
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="maxlength">0</property>
|
<property name="maxlength"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
@ -510,7 +512,7 @@
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="maxlength">0</property>
|
<property name="maxlength"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 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!
|
||||||
|
|
|
@ -759,8 +759,6 @@ void SCH_SCREEN::GetHierarchicalItems( EDA_ITEMS& aItems )
|
||||||
|
|
||||||
void SCH_SCREEN::SelectBlockItems()
|
void SCH_SCREEN::SelectBlockItems()
|
||||||
{
|
{
|
||||||
SCH_ITEM* item;
|
|
||||||
|
|
||||||
PICKED_ITEMS_LIST* pickedlist = &m_BlockLocate.GetItems();
|
PICKED_ITEMS_LIST* pickedlist = &m_BlockLocate.GetItems();
|
||||||
|
|
||||||
if( pickedlist->GetCount() == 0 )
|
if( pickedlist->GetCount() == 0 )
|
||||||
|
@ -770,7 +768,7 @@ void SCH_SCREEN::SelectBlockItems()
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < pickedlist->GetCount(); ii++ )
|
for( unsigned ii = 0; ii < pickedlist->GetCount(); ii++ )
|
||||||
{
|
{
|
||||||
item = (SCH_ITEM*) pickedlist->GetPickedItem( ii );
|
SCH_ITEM* item = (SCH_ITEM*) pickedlist->GetPickedItem( ii );
|
||||||
item->SetFlags( SELECTED );
|
item->SetFlags( SELECTED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -781,18 +779,17 @@ void SCH_SCREEN::SelectBlockItems()
|
||||||
// be sure end lines that are on the block limits are seen inside this block
|
// be sure end lines that are on the block limits are seen inside this block
|
||||||
m_BlockLocate.Inflate( 1 );
|
m_BlockLocate.Inflate( 1 );
|
||||||
unsigned last_select_id = pickedlist->GetCount();
|
unsigned last_select_id = pickedlist->GetCount();
|
||||||
unsigned ii = 0;
|
|
||||||
|
|
||||||
for( ; ii < last_select_id; ii++ )
|
for( unsigned ii = 0; ii < last_select_id; ii++ )
|
||||||
{
|
{
|
||||||
item = (SCH_ITEM*)pickedlist->GetPickedItem( ii );
|
SCH_ITEM* item = (SCH_ITEM*)pickedlist->GetPickedItem( ii );
|
||||||
item->SetFlags( IS_DRAGGED );
|
item->SetFlags( IS_DRAGGED );
|
||||||
|
|
||||||
if( item->Type() == SCH_LINE_T )
|
if( item->Type() == SCH_LINE_T )
|
||||||
{
|
{
|
||||||
item->IsSelectStateChanged( m_BlockLocate );
|
item->IsSelectStateChanged( m_BlockLocate );
|
||||||
|
|
||||||
if( ( item->GetFlags() & SELECTED ) == 0 )
|
if( !item->IsSelected() )
|
||||||
{ // This is a special case:
|
{ // This is a special case:
|
||||||
// this selected wire has no ends in block.
|
// this selected wire has no ends in block.
|
||||||
// But it was selected (because it intersects the selecting area),
|
// But it was selected (because it intersects the selecting area),
|
||||||
|
@ -814,8 +811,8 @@ void SCH_SCREEN::SelectBlockItems()
|
||||||
|
|
||||||
item->GetConnectionPoints( connections );
|
item->GetConnectionPoints( connections );
|
||||||
|
|
||||||
for( size_t i = 0; i < connections.size(); i++ )
|
for( size_t jj = 0; jj < connections.size(); jj++ )
|
||||||
addConnectedItemsToBlock( connections[i] );
|
addConnectedItemsToBlock( connections[jj] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -940,7 +940,14 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent )
|
||||||
SCH_SCREEN* screen = GetScreen();
|
SCH_SCREEN* screen = GetScreen();
|
||||||
SCH_ITEM* item = screen->GetCurItem();
|
SCH_ITEM* item = screen->GetCurItem();
|
||||||
|
|
||||||
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
// The easiest way to handle a menu or a hot key drag command
|
||||||
|
// is to simulate a block drag command
|
||||||
|
//
|
||||||
|
// When a drag item is requested, some items use a BLOCK_DRAG_ITEM drag type
|
||||||
|
// an some items use a BLOCK_DRAG drag type (mainly a junction)
|
||||||
|
// a BLOCK_DRAG collects all items in a block (here a 2x2 rect centered on the cursor)
|
||||||
|
// and BLOCK_DRAG_ITEM drag only the selected item
|
||||||
|
BLOCK_COMMAND_T dragType = BLOCK_DRAG_ITEM;
|
||||||
|
|
||||||
if( item == NULL )
|
if( item == NULL )
|
||||||
{
|
{
|
||||||
|
@ -958,42 +965,43 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent )
|
||||||
// Exit if no item found at the current location or the item is already being edited.
|
// Exit if no item found at the current location or the item is already being edited.
|
||||||
if( (item == NULL) || (item->GetFlags() != 0) )
|
if( (item == NULL) || (item->GetFlags() != 0) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// When a junction or a node is found, a BLOCK_DRAG is better
|
||||||
|
if( m_collectedItems.IsCorner() || m_collectedItems.IsNode( false )
|
||||||
|
|| m_collectedItems.IsDraggableJunction() )
|
||||||
|
dragType = BLOCK_DRAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( item->Type() )
|
switch( item->Type() )
|
||||||
{
|
{
|
||||||
case SCH_BUS_BUS_ENTRY_T:
|
case SCH_BUS_BUS_ENTRY_T:
|
||||||
case SCH_BUS_WIRE_ENTRY_T:
|
case SCH_BUS_WIRE_ENTRY_T:
|
||||||
case SCH_LINE_T:
|
case SCH_LINE_T:
|
||||||
case SCH_JUNCTION_T:
|
case SCH_JUNCTION_T:
|
||||||
if( item->GetLayer() == LAYER_BUS )
|
case SCH_COMPONENT_T:
|
||||||
|
case SCH_LABEL_T:
|
||||||
|
case SCH_GLOBAL_LABEL_T:
|
||||||
|
case SCH_HIERARCHICAL_LABEL_T:
|
||||||
|
case SCH_SHEET_T:
|
||||||
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
|
||||||
|
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
||||||
|
{
|
||||||
|
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
||||||
|
|
||||||
|
if( !HandleBlockBegin( &dc, dragType, GetCrossHairPosition() ) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Give a non null size to the search block:
|
||||||
|
screen->m_BlockLocate.Inflate( 1 );
|
||||||
|
HandleBlockEnd( &dc );
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Fall thru if item is not on bus layer.
|
default:
|
||||||
case SCH_COMPONENT_T:
|
wxFAIL_MSG( wxString::Format( wxT( "Cannot drag schematic item type %s." ),
|
||||||
case SCH_LABEL_T:
|
GetChars( item->GetClass() ) ) );
|
||||||
case SCH_GLOBAL_LABEL_T:
|
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
|
||||||
case SCH_SHEET_T:
|
|
||||||
m_canvas->MoveCursorToCrossHair();
|
|
||||||
|
|
||||||
// The easiest way to handle a drag component or sheet command
|
|
||||||
// is to simulate a block drag command
|
|
||||||
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
|
||||||
{
|
|
||||||
if( !HandleBlockBegin( &dc, BLOCK_DRAG, GetCrossHairPosition() ) )
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Give a non null size to the search block:
|
|
||||||
screen->m_BlockLocate.Inflate( 1 );
|
|
||||||
HandleBlockEnd( &dc );
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
wxFAIL_MSG( wxString::Format( wxT( "Cannot drag schematic item type %s." ),
|
|
||||||
GetChars( item->GetClass() ) ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ typedef enum {
|
||||||
BLOCK_DELETE,
|
BLOCK_DELETE,
|
||||||
BLOCK_PASTE,
|
BLOCK_PASTE,
|
||||||
BLOCK_DRAG,
|
BLOCK_DRAG,
|
||||||
|
BLOCK_DRAG_ITEM, // like BLOCK_DRAG, when used to drag a selected component
|
||||||
|
// and not using an area defined by a mouse drag
|
||||||
BLOCK_ROTATE,
|
BLOCK_ROTATE,
|
||||||
BLOCK_FLIP,
|
BLOCK_FLIP,
|
||||||
BLOCK_ZOOM,
|
BLOCK_ZOOM,
|
||||||
|
@ -166,7 +168,10 @@ public:
|
||||||
* Function IsDragging
|
* Function IsDragging
|
||||||
* returns true if the current block command is a drag operation.
|
* returns true if the current block command is a drag operation.
|
||||||
*/
|
*/
|
||||||
bool IsDragging() const { return m_command == BLOCK_DRAG; }
|
bool IsDragging() const
|
||||||
|
{
|
||||||
|
return m_command == BLOCK_DRAG || m_command == BLOCK_DRAG_ITEM;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsIdle
|
* Function IsIdle
|
||||||
|
|
|
@ -159,7 +159,6 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w
|
||||||
bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL );
|
bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_NetlistFilenameCtrl->SetMaxLength( 0 );
|
|
||||||
bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
|
|
@ -1712,7 +1712,7 @@
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="maxlength">0</property>
|
<property name="maxlength"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
|
|
@ -146,14 +146,17 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_Cu:
|
case B_Cu:
|
||||||
attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() );
|
attrib = wxString::Format( wxT( "Copper,L%d,Bot" ), aBoard->GetCopperLayerCount() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case F_Cu:
|
case F_Cu:
|
||||||
|
attrib = wxString::Format( wxT( "Copper,L1,Top" ) );
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if( IsCopperLayer( aLayer ) )
|
if( IsCopperLayer( aLayer ) )
|
||||||
{
|
{
|
||||||
attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer+1 );
|
attrib = wxString::Format( wxT( "Copper,L%d,Inr" ), aLayer+1 );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue