Commit f05b6d49 authored by Macor Mattila's avatar Macor Mattila Committed by jean-pierre charras

Pcbnew: Commit block move patch from Marco Mattila

parent 37ad67df
...@@ -30,7 +30,7 @@ static void LoadLayers( LINE_READER* aLine ); ...@@ -30,7 +30,7 @@ static void LoadLayers( LINE_READER* aLine );
bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& FullFileName ) bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& FullFileName )
{ {
char Name1[256]; char Name1[256];
bool itemLoaded; bool itemLoaded = false;
SCH_ITEM* Phead; SCH_ITEM* Phead;
SCH_ITEM* Pnext; SCH_ITEM* Pnext;
SCH_ITEM* item; SCH_ITEM* item;
......
...@@ -238,7 +238,8 @@ void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field ) ...@@ -238,7 +238,8 @@ void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
msg = AddHotkeyName( _( "Rotate Field" ), s_Schematic_Hokeys_Descr, HK_ROTATE ); msg = AddHotkeyName( _( "Rotate Field" ), s_Schematic_Hokeys_Descr, HK_ROTATE );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_FIELD, msg, rotate_field_xpm ); ADD_MENUITEM( PopMenu, ID_POPUP_SCH_ROTATE_FIELD, msg, rotate_field_xpm );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_FIELD, _( "Edit Field" ), edit_text_xpm ); msg = AddHotkeyName( _( "Edit Field" ), s_Schematic_Hokeys_Descr, HK_EDIT );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_FIELD, msg, edit_text_xpm );
} }
......
...@@ -110,6 +110,15 @@ public: ...@@ -110,6 +110,15 @@ public:
{ {
return m_ItemsSelection.GetCount(); return m_ItemsSelection.GetCount();
} }
/** Function SetLastCursorPosition
* sets m_BlockLastCursorPosition
* @param aPosition = new position
**/
void SetLastCursorPosition( wxPoint aPosition )
{
m_BlockLastCursorPosition = aPosition;
}
}; };
......
This diff is collapsed.
...@@ -532,8 +532,8 @@ void DIMENSION::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -532,8 +532,8 @@ void DIMENSION::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
{ {
int ox, oy, typeaff, width, gcolor; int ox, oy, typeaff, width, gcolor;
ox = offset.x; ox = -offset.x;
oy = offset.y; oy = -offset.y;
m_Text->Draw( panel, DC, mode_color, offset ); m_Text->Draw( panel, DC, mode_color, offset );
......
...@@ -229,7 +229,7 @@ wxPoint DRAWSEGMENT::GetEnd() const ...@@ -229,7 +229,7 @@ wxPoint DRAWSEGMENT::GetEnd() const
void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
int draw_mode, const wxPoint& notUsed ) int draw_mode, const wxPoint& aOffset )
{ {
int ux0, uy0, dx, dy; int ux0, uy0, dx, dy;
int l_piste; int l_piste;
...@@ -246,12 +246,12 @@ void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -246,12 +246,12 @@ void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
l_piste = m_Width >> 1; /* half trace width */ l_piste = m_Width >> 1; /* half trace width */
// Line start point or Circle and Arc center // Line start point or Circle and Arc center
ux0 = m_Start.x; ux0 = m_Start.x + aOffset.x;
uy0 = m_Start.y; uy0 = m_Start.y + aOffset.y;
// Line end point or circle and arc start point // Line end point or circle and arc start point
dx = m_End.x; dx = m_End.x + aOffset.x;
dy = m_End.y; dy = m_End.y + aOffset.y;
mode = DisplayOpt.DisplayDrawItems; mode = DisplayOpt.DisplayDrawItems;
if( m_Flags & FORCE_SKETCH ) if( m_Flags & FORCE_SKETCH )
......
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, void Draw( WinEDA_DrawPanel* panel, wxDC* DC,
int aDrawMode, const wxPoint& offset = ZeroOffset ); int aDrawMode, const wxPoint& aOffset = ZeroOffset );
/** /**
* Function DisplayInfo * Function DisplayInfo
......
This diff is collapsed.
...@@ -144,7 +144,7 @@ public: ...@@ -144,7 +144,7 @@ public:
/* Display on screen: */ /* Display on screen: */
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& offset = ZeroOffset ); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset );
/* divers */ /* divers */
int Shape() const { return m_Shape & 0xFF; } int Shape() const { return m_Shape & 0xFF; }
...@@ -341,7 +341,7 @@ public: ...@@ -341,7 +341,7 @@ public:
} }
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& offset = ZeroOffset ); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset );
/** /**
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment