Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
cf7dbf6f
Commit
cf7dbf6f
authored
Nov 18, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some minor issues
parent
25bfd822
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
90 additions
and
110 deletions
+90
-110
dialog_edit_label.cpp
eeschema/dialogs/dialog_edit_label.cpp
+4
-4
dialog_lib_edit_text_base.cpp
eeschema/dialogs/dialog_lib_edit_text_base.cpp
+3
-3
dialog_lib_edit_text_base.fbp
eeschema/dialogs/dialog_lib_edit_text_base.fbp
+4
-2
dialog_lib_edit_text_base.h
eeschema/dialogs/dialog_lib_edit_text_base.h
+1
-1
edit_label.cpp
eeschema/edit_label.cpp
+4
-4
board_undo_redo.cpp
pcbnew/board_undo_redo.cpp
+2
-24
class_mire.cpp
pcbnew/class_mire.cpp
+0
-10
class_mire.h
pcbnew/class_mire.h
+0
-6
dialog_graphic_item_properties.cpp
pcbnew/dialogs/dialog_graphic_item_properties.cpp
+28
-14
dialog_target_properties_base.cpp
pcbnew/dialogs/dialog_target_properties_base.cpp
+18
-18
dialog_target_properties_base.fbp
pcbnew/dialogs/dialog_target_properties_base.fbp
+15
-13
dialog_target_properties_base.h
pcbnew/dialogs/dialog_target_properties_base.h
+5
-5
target_edit.cpp
pcbnew/target_edit.cpp
+6
-6
No files found.
eeschema/dialogs/dialog_edit_label.cpp
View file @
cf7dbf6f
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20
08 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 201
1
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
1
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 20
13 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 201
3
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
3
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
...
...
@@ -295,7 +295,7 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent )
m_Parent
->
OnModify
();
/
* Make the text size as new default size if it is a new text */
/
/ Make the text size the new default size ( if it is a new text ):
if
(
m_CurrentText
->
IsNew
()
)
m_Parent
->
SetDefaultLabelSize
(
m_CurrentText
->
GetSize
().
x
);
...
...
eeschema/dialogs/dialog_lib_edit_text_base.cpp
View file @
cf7dbf6f
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Nov 6 2013
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -93,8 +93,8 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
wxString
m_TextVJustificationOptChoices
[]
=
{
_
(
"Align bottom"
),
_
(
"Align center"
),
_
(
"Align top"
)
};
int
m_TextVJustificationOptNChoices
=
sizeof
(
m_TextVJustificationOptChoices
)
/
sizeof
(
wxString
);
m_TextVJustificationOpt
=
new
wxRadioBox
(
this
,
wxID_ANY
,
_
(
"Vertic
le
Justify"
),
wxDefaultPosition
,
wxDefaultSize
,
m_TextVJustificationOptNChoices
,
m_TextVJustificationOptChoices
,
1
,
wxRA_SPECIFY_COLS
);
m_TextVJustificationOpt
->
SetSelection
(
1
);
m_TextVJustificationOpt
=
new
wxRadioBox
(
this
,
wxID_ANY
,
_
(
"Vertic
al
Justify"
),
wxDefaultPosition
,
wxDefaultSize
,
m_TextVJustificationOptNChoices
,
m_TextVJustificationOptChoices
,
1
,
wxRA_SPECIFY_COLS
);
m_TextVJustificationOpt
->
SetSelection
(
0
);
bBottomtBoxSizer
->
Add
(
m_TextVJustificationOpt
,
1
,
wxALL
|
wxEXPAND
,
5
);
...
...
eeschema/dialogs/dialog_lib_edit_text_base.fbp
View file @
cf7dbf6f
...
...
@@ -20,8 +20,10 @@
<property
name=
"path"
>
.
</property>
<property
name=
"precompiled_header"
></property>
<property
name=
"relative_path"
>
1
</property>
<property
name=
"skip_lua_events"
>
1
</property>
<property
name=
"skip_php_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_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
...
...
@@ -1150,7 +1152,7 @@
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Vertic
le
Justify
</property>
<property
name=
"label"
>
Vertic
al
Justify
</property>
<property
name=
"majorDimension"
>
1
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
...
...
@@ -1167,7 +1169,7 @@
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"selection"
>
1
</property>
<property
name=
"selection"
>
0
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxRA_SPECIFY_COLS
</property>
...
...
eeschema/dialogs/dialog_lib_edit_text_base.h
View file @
cf7dbf6f
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Nov 6 2013
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
eeschema/edit_label.cpp
View file @
cf7dbf6f
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20
04 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 20
13 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-201
3
KiCad Developers, see change_log.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
...
...
@@ -105,7 +105,6 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
textItem
->
SetSize
(
wxSize
(
GetDefaultLabelSize
(),
GetDefaultLabelSize
()
)
);
textItem
->
SetFlags
(
IS_NEW
|
IS_MOVED
);
textItem
->
Draw
(
m_canvas
,
aDC
,
wxPoint
(
0
,
0
),
g_XorMode
);
EditSchematicText
(
textItem
);
if
(
textItem
->
GetText
().
IsEmpty
()
)
...
...
@@ -123,7 +122,8 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
lastGlobalLabelShape
=
textItem
->
GetShape
();
}
textItem
->
Draw
(
m_canvas
,
aDC
,
wxPoint
(
0
,
0
),
GR_DEFAULT_DRAWMODE
);
// Prepare display to move the new item
textItem
->
Draw
(
m_canvas
,
aDC
,
wxPoint
(
0
,
0
),
g_XorMode
);
MoveItem
(
(
SCH_ITEM
*
)
textItem
,
aDC
);
return
textItem
;
...
...
pcbnew/board_undo_redo.cpp
View file @
cf7dbf6f
...
...
@@ -181,17 +181,6 @@ void SwapData( BOARD_ITEM* aItem, BOARD_ITEM* aImage )
return
;
}
// Swap layers:
if
(
aItem
->
Type
()
!=
PCB_MODULE_T
&&
aItem
->
Type
()
!=
PCB_ZONE_AREA_T
)
{
// These items have a global swap function.
LAYER_NUM
layer
,
layerimg
;
layer
=
aItem
->
GetLayer
();
layerimg
=
aImage
->
GetLayer
();
aItem
->
SetLayer
(
layerimg
);
aImage
->
SetLayer
(
layer
);
}
switch
(
aItem
->
Type
()
)
{
case
PCB_MODULE_T
:
...
...
@@ -213,18 +202,7 @@ void SwapData( BOARD_ITEM* aItem, BOARD_ITEM* aImage )
break
;
case
PCB_LINE_T
:
#if 0
EXCHG( ( (DRAWSEGMENT*) aItem )->m_Start, ( (DRAWSEGMENT*) aImage )->m_Start );
EXCHG( ( (DRAWSEGMENT*) aItem )->m_End, ( (DRAWSEGMENT*) aImage )->m_End );
EXCHG( ( (DRAWSEGMENT*) aItem )->m_Width, ( (DRAWSEGMENT*) aImage )->m_Width );
EXCHG( ( (DRAWSEGMENT*) aItem )->m_Shape, ( (DRAWSEGMENT*) aImage )->m_Shape );
#else
{
DRAWSEGMENT
tmp
=
*
(
DRAWSEGMENT
*
)
aImage
;
*
aImage
=
*
aItem
;
*
aItem
=
tmp
;
}
#endif
std
::
swap
(
*
((
DRAWSEGMENT
*
)
aItem
),
*
((
DRAWSEGMENT
*
)
aImage
)
);
break
;
case
PCB_TRACE_T
:
...
...
@@ -277,7 +255,7 @@ void SwapData( BOARD_ITEM* aItem, BOARD_ITEM* aImage )
break
;
case
PCB_TARGET_T
:
(
(
PCB_TARGET
*
)
aItem
)
->
Exchg
(
(
PCB_TARGET
*
)
aImage
);
std
::
swap
(
*
((
PCB_TARGET
*
)
aItem
),
*
((
PCB_TARGET
*
)
aImage
)
);
break
;
case
PCB_DIMENSION_T
:
...
...
pcbnew/class_mire.cpp
View file @
cf7dbf6f
...
...
@@ -71,16 +71,6 @@ PCB_TARGET::~PCB_TARGET()
{
}
void
PCB_TARGET
::
Exchg
(
PCB_TARGET
*
source
)
{
EXCHG
(
m_Pos
,
source
->
m_Pos
);
EXCHG
(
m_Width
,
source
->
m_Width
);
EXCHG
(
m_Size
,
source
->
m_Size
);
EXCHG
(
m_Shape
,
source
->
m_Shape
);
}
void
PCB_TARGET
::
Copy
(
PCB_TARGET
*
source
)
{
m_Layer
=
source
->
m_Layer
;
...
...
pcbnew/class_mire.h
View file @
cf7dbf6f
...
...
@@ -71,12 +71,6 @@ public:
void
SetWidth
(
int
aWidth
)
{
m_Width
=
aWidth
;
}
int
GetWidth
()
const
{
return
m_Width
;
}
/**
* Function Exchg
* swaps data with another PCB_TARGET for use by undo-redo.
*/
void
Exchg
(
PCB_TARGET
*
aTarget
);
void
Move
(
const
wxPoint
&
aMoveVector
)
{
m_Pos
+=
aMoveVector
;
...
...
pcbnew/dialogs/dialog_graphic_item_properties.cpp
View file @
cf7dbf6f
/**************************************/
/* dialog_graphic_item_properties.cpp */
/**************************************/
/**
* @file dialog_graphic_item_properties.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2013 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 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
*/
/* Edit parameters values of graphic items type DRAWSEGMENTS:
* Lines
...
...
@@ -41,7 +63,7 @@ public:
private
:
void
initDlg
(
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
)
;
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
void
OnLayerChoice
(
wxCommandEvent
&
event
);
};
...
...
@@ -71,9 +93,8 @@ void PCB_EDIT_FRAME::InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxD
}
m_canvas
->
SetIgnoreMouseEvents
(
true
);
DIALOG_GRAPHIC_ITEM_PROPERTIES
*
dialog
=
new
DIALOG_GRAPHIC_ITEM_PROPERTIES
(
this
,
aItem
,
aDC
);
dialog
->
ShowModal
();
dialog
->
Destroy
();
DIALOG_GRAPHIC_ITEM_PROPERTIES
dlg
(
this
,
aItem
,
aDC
);
dlg
.
ShowModal
();
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
SetIgnoreMouseEvents
(
false
);
}
...
...
@@ -85,7 +106,6 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::initDlg( )
* according to the item parameters values
*/
{
SetFocus
();
m_StandardButtonsSizerOK
->
SetDefault
();
// Set unit symbol
...
...
@@ -246,9 +266,3 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event )
Close
(
true
);
}
void
DIALOG_GRAPHIC_ITEM_PROPERTIES
::
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
pcbnew/dialogs/dialog_target_properties_base.cpp
View file @
cf7dbf6f
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Nov 6 2013
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -27,38 +27,38 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi
m_staticTextSize
=
new
wxStaticText
(
this
,
wxID_ANY
,
wxT
(
"Size"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextSize
->
Wrap
(
-
1
);
fgSizer
->
Add
(
m_staticTextSize
,
0
,
wx
AL
L
,
5
);
fgSizer
->
Add
(
m_staticTextSize
,
0
,
wx
TOP
|
wxBOTTOM
|
wxLEFT
|
wxALIGN_CENTER_VERTICA
L
,
5
);
m_
MireWidth
Ctrl
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer
->
Add
(
m_
MireWidthCtrl
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_
TargetSize
Ctrl
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer
->
Add
(
m_
TargetSizeCtrl
,
0
,
wxALL
|
wxEXPAND
|
wxALIGN_CENTER_VERTICAL
,
5
);
m_staticTextSizeUnits
=
new
wxStaticText
(
this
,
wxID_ANY
,
wxT
(
"unit"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextSizeUnits
->
Wrap
(
-
1
);
fgSizer
->
Add
(
m_staticTextSizeUnits
,
0
,
wxAL
L
,
5
);
fgSizer
->
Add
(
m_staticTextSizeUnits
,
0
,
wxAL
IGN_CENTER_VERTICAL
|
wxTOP
|
wxBOTTOM
|
wxRIGHT
,
5
);
m_staticTextThickness
=
new
wxStaticText
(
this
,
wxID_ANY
,
wxT
(
"Thickness"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextThickness
->
Wrap
(
-
1
);
fgSizer
->
Add
(
m_staticTextThickness
,
0
,
wx
AL
L
,
5
);
fgSizer
->
Add
(
m_staticTextThickness
,
0
,
wx
TOP
|
wxBOTTOM
|
wxLEFT
|
wxALIGN_CENTER_VERTICA
L
,
5
);
m_
MireSize
Ctrl
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer
->
Add
(
m_
MireSizeCtrl
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_
TargetThickness
Ctrl
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizer
->
Add
(
m_
TargetThicknessCtrl
,
0
,
wxEXPAND
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
m_staticTextThicknessUnits
=
new
wxStaticText
(
this
,
wxID_ANY
,
wxT
(
"unit"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextThicknessUnits
->
Wrap
(
-
1
);
fgSizer
->
Add
(
m_staticTextThicknessUnits
,
0
,
wxAL
L
,
5
);
fgSizer
->
Add
(
m_staticTextThicknessUnits
,
0
,
wxAL
IGN_CENTER_VERTICAL
|
wxTOP
|
wxBOTTOM
|
wxRIGHT
,
5
);
m_staticTextShape
=
new
wxStaticText
(
this
,
wxID_ANY
,
wxT
(
"Shape"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextShape
->
Wrap
(
-
1
);
fgSizer
->
Add
(
m_staticTextShape
,
0
,
wx
AL
L
,
5
);
fgSizer
->
Add
(
m_staticTextShape
,
0
,
wx
TOP
|
wxBOTTOM
|
wxLEFT
|
wxALIGN_CENTER_VERTICA
L
,
5
);
wxString
m_
Mire
ShapeChoices
[]
=
{
wxT
(
"+"
),
wxT
(
"X"
)
};
int
m_
MireShapeNChoices
=
sizeof
(
m_Mire
ShapeChoices
)
/
sizeof
(
wxString
);
m_
MireShape
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_MireShapeNChoices
,
m_Mire
ShapeChoices
,
0
);
m_
Mire
Shape
->
SetSelection
(
0
);
fgSizer
->
Add
(
m_
MireShape
,
0
,
wxALL
|
wxEXPAND
,
5
);
wxString
m_
Target
ShapeChoices
[]
=
{
wxT
(
"+"
),
wxT
(
"X"
)
};
int
m_
TargetShapeNChoices
=
sizeof
(
m_Target
ShapeChoices
)
/
sizeof
(
wxString
);
m_
TargetShape
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_TargetShapeNChoices
,
m_Target
ShapeChoices
,
0
);
m_
Target
Shape
->
SetSelection
(
0
);
fgSizer
->
Add
(
m_
TargetShape
,
0
,
wxALL
|
wxEXPAND
|
wxALIGN_CENTER_VERTICAL
,
5
);
fgSizer
->
Add
(
0
,
0
,
1
,
wxEXPAND
,
5
);
fgSizer
->
Add
(
0
,
0
,
1
,
wxEXPAND
|
wxALIGN_CENTER_VERTICAL
,
5
);
bSizerUpper
->
Add
(
fgSizer
,
1
,
wxEXPAND
,
5
);
...
...
@@ -66,8 +66,8 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi
bSizerMain
->
Add
(
bSizerUpper
,
1
,
wxEXPAND
,
5
);
m_staticline
1
=
new
wxStaticLine
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLI_HORIZONTAL
);
bSizerMain
->
Add
(
m_staticline
1
,
0
,
wxEXPAND
|
wxALL
,
5
);
m_staticline
=
new
wxStaticLine
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLI_HORIZONTAL
);
bSizerMain
->
Add
(
m_staticline
,
0
,
wxEXPAND
|
wxALL
,
5
);
m_sdbSizerButts
=
new
wxStdDialogButtonSizer
();
m_sdbSizerButtsOK
=
new
wxButton
(
this
,
wxID_OK
);
...
...
pcbnew/dialogs/dialog_target_properties_base.fbp
View file @
cf7dbf6f
...
...
@@ -20,8 +20,10 @@
<property
name=
"path"
>
.
</property>
<property
name=
"precompiled_header"
></property>
<property
name=
"relative_path"
>
1
</property>
<property
name=
"skip_lua_events"
>
1
</property>
<property
name=
"skip_php_events"
>
1
</property>
<property
name=
"skip_python_events"
>
1
</property>
<property
name=
"ui_table"
>
UI
</property>
<property
name=
"use_enum"
>
0
</property>
<property
name=
"use_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
...
...
@@ -118,7 +120,7 @@
<property
name=
"vgap"
>
0
</property>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wx
AL
L
</property>
<property
name=
"flag"
>
wx
TOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICA
L
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -201,7 +203,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
|wxALIGN_CENTER_VERTICAL
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxTextCtrl"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -239,7 +241,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
MireWidth
Ctrl
</property>
<property
name=
"name"
>
m_
TargetSize
Ctrl
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -292,7 +294,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxAL
L
</property>
<property
name=
"flag"
>
wxAL
IGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -375,7 +377,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wx
AL
L
</property>
<property
name=
"flag"
>
wx
TOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICA
L
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -458,7 +460,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wx
ALL|wxEXPAND
</property>
<property
name=
"flag"
>
wx
EXPAND|wxALIGN_CENTER_VERTICAL|wxALL
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxTextCtrl"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -496,7 +498,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
MireSize
Ctrl
</property>
<property
name=
"name"
>
m_
TargetThickness
Ctrl
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -549,7 +551,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxAL
L
</property>
<property
name=
"flag"
>
wxAL
IGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -632,7 +634,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wx
AL
L
</property>
<property
name=
"flag"
>
wx
TOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICA
L
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -715,7 +717,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
|wxALIGN_CENTER_VERTICAL
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxChoice"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -753,7 +755,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
Mire
Shape
</property>
<property
name=
"name"
>
m_
Target
Shape
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -803,7 +805,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"flag"
>
wxEXPAND
|wxALIGN_CENTER_VERTICAL
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"spacer"
expanded=
"1"
>
<property
name=
"height"
>
0
</property>
...
...
@@ -854,7 +856,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_staticline
1
</property>
<property
name=
"name"
>
m_staticline
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
pcbnew/dialogs/dialog_target_properties_base.h
View file @
cf7dbf6f
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Nov 6 2013
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -38,14 +38,14 @@ class TARGET_PROPERTIES_DIALOG_EDITOR_BASE : public DIALOG_SHIM
protected
:
wxStaticText
*
m_staticTextSize
;
wxTextCtrl
*
m_
MireWidth
Ctrl
;
wxTextCtrl
*
m_
TargetSize
Ctrl
;
wxStaticText
*
m_staticTextSizeUnits
;
wxStaticText
*
m_staticTextThickness
;
wxTextCtrl
*
m_
MireSize
Ctrl
;
wxTextCtrl
*
m_
TargetThickness
Ctrl
;
wxStaticText
*
m_staticTextThicknessUnits
;
wxStaticText
*
m_staticTextShape
;
wxChoice
*
m_
Mire
Shape
;
wxStaticLine
*
m_staticline
1
;
wxChoice
*
m_
Target
Shape
;
wxStaticLine
*
m_staticline
;
wxStdDialogButtonSizer
*
m_sdbSizerButts
;
wxButton
*
m_sdbSizerButtsOK
;
wxButton
*
m_sdbSizerButtsCancel
;
...
...
pcbnew/target_edit.cpp
View file @
cf7dbf6f
...
...
@@ -100,14 +100,14 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( PCB_EDIT_FRAME
// Size:
m_staticTextSizeUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_
Mire
SizeCtrl
->
SetValue
(
ReturnStringFromValue
(
g_UserUnit
,
m_Target
->
GetSize
()
)
);
m_
Target
SizeCtrl
->
SetValue
(
ReturnStringFromValue
(
g_UserUnit
,
m_Target
->
GetSize
()
)
);
// Thickness:
m_staticTextThicknessUnits
->
SetLabel
(
GetUnitsLabel
(
g_UserUnit
)
);
m_
MireWidth
Ctrl
->
SetValue
(
ReturnStringFromValue
(
g_UserUnit
,
m_Target
->
GetWidth
()
)
);
m_
TargetThickness
Ctrl
->
SetValue
(
ReturnStringFromValue
(
g_UserUnit
,
m_Target
->
GetWidth
()
)
);
// Shape
m_
Mire
Shape
->
SetSelection
(
m_Target
->
GetShape
()
?
1
:
0
);
m_
Target
Shape
->
SetSelection
(
m_Target
->
GetShape
()
?
1
:
0
);
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
...
...
@@ -135,13 +135,13 @@ void TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick( wxCommandEvent& event )
m_Target
->
SetFlags
(
IN_EDIT
);
// set flag in edit to force
// undo/redo/abort proper operation
int
tmp
=
ReturnValueFromString
(
g_UserUnit
,
m_
MireWidth
Ctrl
->
GetValue
()
);
int
tmp
=
ReturnValueFromString
(
g_UserUnit
,
m_
TargetThickness
Ctrl
->
GetValue
()
);
m_Target
->
SetWidth
(
tmp
);
MireDefaultSize
=
ReturnValueFromString
(
g_UserUnit
,
m_
Mire
SizeCtrl
->
GetValue
()
);
MireDefaultSize
=
ReturnValueFromString
(
g_UserUnit
,
m_
Target
SizeCtrl
->
GetValue
()
);
m_Target
->
SetSize
(
MireDefaultSize
);
m_Target
->
SetShape
(
m_
Mire
Shape
->
GetSelection
()
?
1
:
0
);
m_Target
->
SetShape
(
m_
Target
Shape
->
GetSelection
()
?
1
:
0
);
m_Target
->
Draw
(
m_Parent
->
GetCanvas
(),
m_DC
,
(
m_Target
->
IsMoving
()
)
?
GR_XOR
:
GR_OR
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment