Commit 5c790f50 authored by charras's avatar charras

Added dialog box to edit graphic items

parent 57d9096a
......@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++Pcbnew:
Added dialog box to edit graphic items (graphic segments, circles, arcs)
properties
2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++All
......
......@@ -209,6 +209,8 @@ public:
void Place_Module( MODULE* module, wxDC* DC );
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule,
wxDC* DC, const wxPoint& pos );
// Graphic items edition:
void InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxDC* aDC);
// module texts
void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
......@@ -661,7 +663,6 @@ public:
// Graphic segments type DRAWSEGMENT handling:
DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC );
void End_Edge( DRAWSEGMENT* Segment, wxDC* DC );
void Drawing_SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC );
void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC );
void Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC );
......
No preview for this file type
This diff is collapsed.
......@@ -56,6 +56,8 @@ set(PCBNEW_SRCS
dialog_general_options.cpp
dialog_general_options_BoardEditor_base.cpp
# dialog_graphic_items_options.cpp
dialog_graphic_item_properties.cpp
dialog_graphic_item_properties_base.cpp
# dialog_initpcb.cpp
# dialog_netlist.cpp
dialog_pcb_text_properties.cpp
......
......@@ -8,7 +8,7 @@
class DRAWSEGMENT : public BOARD_ITEM
{
public:
int m_Width; // 0 = line. if > 0 = tracks, bus ...
int m_Width; // thickness of lines ...
wxPoint m_Start; // Line start point
wxPoint m_End; // Line end point
......
/******************************************************/
/* editpads.cpp: Pad editing functions and dialog box */
/******************************************************/
/*******************************************************************/
/* dialog_pad_properties.cpp: Pad editing functions and dialog box */
/* see also dialog_pad_properties.xxx (built with wxFormBuilder) */
/*******************************************************************/
#include "fctsys.h"
#include "common.h"
......@@ -514,7 +515,10 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
if( m_CurrentPad->GetNetname() != Current_PadNetName )
{
if( Current_PadNetName.IsEmpty() )
{
m_CurrentPad->SetNet( 0 );
m_CurrentPad->SetNetname( Current_PadNetName );
}
else
{
const EQUIPOT* net = m_Parent->m_Pcb->FindNet( Current_PadNetName );
......
......@@ -842,7 +842,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_PCB_EDIT_DRAWING:
Drawing_SetNewWidth( (DRAWSEGMENT*) GetCurItem(), &dc );
InstallGraphicItemPropertiesDialog( (DRAWSEGMENT*)GetCurItem(), &dc);
DrawPanel->MouseToCursorSchema();
break;
......
......@@ -126,31 +126,6 @@ void WinEDA_PcbFrame::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
}
/*************************************************************************/
void WinEDA_PcbFrame::Drawing_SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC )
/*************************************************************************/
/* Met a la largeur courante le segment pointe part la souris
*/
{
if( DrawSegm == NULL )
return;
DrawSegm->Draw( DrawPanel, DC, GR_XOR );
if( DrawSegm->GetLayer() == EDGE_N )
DrawSegm->m_Width = g_DesignSettings.m_EdgeSegmentWidth;
else
DrawSegm->m_Width = g_DesignSettings.m_DrawSegmentWidth;
DrawSegm->Draw( DrawPanel, DC, GR_OR );
DrawSegm->Display_Infos( this );
GetScreen()->SetModify();
}
/******************************************************************************/
void WinEDA_PcbFrame::Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC )
/******************************************************************************/
......
......@@ -28,6 +28,8 @@ OBJECTS= $(TARGET).o classpcb.o\
dialog_freeroute_exchange.o\
modedit_undo_redo.o\
block_module_editor.o\
dialog_graphic_item_properties.o\
dialog_graphic_item_properties_base.o\
dialog_pad_properties.o\
dialog_pad_properties_base.o\
dialog_pcb_text_properties.o\
......
......@@ -391,12 +391,18 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
DrawPanel->MouseToCursorSchema();
break;
case TYPE_COTATION:
Install_Edit_Cotation( (COTATION*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_TEXTE_MODULE:
InstallTextModOptionsFrame( (TEXTE_MODULE*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_DRAWSEGMENT:
InstallGraphicItemPropertiesDialog((DRAWSEGMENT*)DrawStruct, &dc);
break;
case TYPE_ZONE_CONTAINER:
......
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