diff --git a/common/block_commande.cpp b/common/block_commande.cpp
index dfc27995b3..990fa6cee0 100644
--- a/common/block_commande.cpp
+++ b/common/block_commande.cpp
@@ -71,6 +71,10 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
msg = _( "Block Drag" );
break;
+ case BLOCK_DRAG_ITEM: // Drag
+ msg = _( "Drag item" );
+ break;
+
case BLOCK_COPY: // Copy
msg = _( "Block Copy" );
break;
diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp
index b43d1669d0..fe259933b4 100644
--- a/common/draw_frame.cpp
+++ b/common/draw_frame.cpp
@@ -717,17 +717,18 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
case BLOCK_IDLE:
break;
- case BLOCK_MOVE: /* Move */
- case BLOCK_DRAG: /* Drag */
- case BLOCK_COPY: /* Copy */
- case BLOCK_DELETE: /* Delete */
- case BLOCK_SAVE: /* Save */
- case BLOCK_ROTATE: /* Rotate 90 deg */
- case BLOCK_FLIP: /* Flip */
- case BLOCK_ZOOM: /* Window Zoom */
+ case BLOCK_MOVE: // Move
+ case BLOCK_DRAG: // Drag (block defined)
+ case BLOCK_DRAG_ITEM: // Drag from a drag item command
+ case BLOCK_COPY: // Copy
+ case BLOCK_DELETE: // Delete
+ case BLOCK_SAVE: // Save
+ case BLOCK_ROTATE: // Rotate 90 deg
+ case BLOCK_FLIP: // Flip
+ case BLOCK_ZOOM: // Window Zoom
case BLOCK_MIRROR_X:
- case BLOCK_MIRROR_Y: /* mirror */
- case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
+ case BLOCK_MIRROR_Y: // mirror
+ case BLOCK_PRESELECT_MOVE: // Move with preselection list
Block->InitData( m_canvas, aPosition );
break;
@@ -736,7 +737,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
Block->SetLastCursorPosition( wxPoint( 0, 0 ) );
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 );
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
-//static const double MAX_AXIS = 1518500251;
-
-// However I am not seeing a problem with this size yet:
+// I am not seeing a problem with this size yet:
static const double MAX_AXIS = INT_MAX - 100;
#define VIRT_MIN (-MAX_AXIS/2.0) ///< min X or Y coordinate in virtual space
diff --git a/eeschema/block.cpp b/eeschema/block.cpp
index 98ea9e62a1..01c7c3fb04 100644
--- a/eeschema/block.cpp
+++ b/eeschema/block.cpp
@@ -133,8 +133,9 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
switch( block->GetCommand() )
{
- case BLOCK_DRAG: /* Drag */
- case BLOCK_MOVE: /* Move */
+ case BLOCK_DRAG: // Drag from mouse
+ case BLOCK_DRAG_ITEM: // Drag from a component selection and drag command
+ case BLOCK_MOVE:
if( m_canvas->IsMouseCaptured() )
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
@@ -238,19 +239,24 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
break;
case BLOCK_DRAG:
+ case BLOCK_DRAG_ITEM: // Drag from a drag command
GetScreen()->BreakSegmentsOnJunctions();
// fall through
case BLOCK_MOVE:
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;
picker.SetItem( GetScreen()->GetCurItem() );
block->PushItem( picker );
}
else
{
+ // Collect all items in the locate block
GetScreen()->UpdatePickList();
}
// fall through
diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp
index abf7fc66ed..139e6cf3ff 100644
--- a/eeschema/block_libedit.cpp
+++ b/eeschema/block_libedit.cpp
@@ -109,9 +109,10 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
DisplayError( this, wxT( "Error in HandleBlockPLace" ) );
break;
- case BLOCK_DRAG: /* Drag */
- case BLOCK_MOVE: /* Move */
- case BLOCK_COPY: /* Copy */
+ case BLOCK_DRAG:
+ case BLOCK_DRAG_ITEM:
+ case BLOCK_MOVE:
+ case BLOCK_COPY:
if ( m_component )
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
m_unit, m_convert,
@@ -132,7 +133,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
}
break;
- case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
+ case BLOCK_PRESELECT_MOVE: // Move with preselection list
nextCmd = true;
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE );
@@ -232,8 +233,9 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
case BLOCK_IDLE:
break;
- case BLOCK_DRAG: /* Drag */
- case BLOCK_MOVE: /* Move */
+ case BLOCK_DRAG:
+ case BLOCK_DRAG_ITEM:
+ case BLOCK_MOVE:
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
GetScreen()->m_BlockLocate.ClearItemsList();
diff --git a/eeschema/dialogs/dialog_edit_label_base.cpp b/eeschema/dialogs/dialog_edit_label_base.cpp
index 739f6a03d0..c46b70895b 100644
--- a/eeschema/dialogs/dialog_edit_label_base.cpp
+++ b/eeschema/dialogs/dialog_edit_label_base.cpp
@@ -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/
//
// 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 );
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 ) );
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 );
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 );
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
diff --git a/eeschema/dialogs/dialog_edit_label_base.fbp b/eeschema/dialogs/dialog_edit_label_base.fbp
index 3008bf2acc..1d8f475b0e 100644
--- a/eeschema/dialogs/dialog_edit_label_base.fbp
+++ b/eeschema/dialogs/dialog_edit_label_base.fbp
@@ -20,8 +20,10 @@
.
1
+ 1
1
1
+ UI
1
0