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
99535864
Commit
99535864
authored
Jul 23, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pl_Editor: bug fixes (default values not saved, and duplicate item names, when adding items)
parent
fff2f017
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
7 deletions
+40
-7
events_functions.cpp
pagelayout_editor/events_functions.cpp
+11
-0
page_layout_writer.cpp
pagelayout_editor/page_layout_writer.cpp
+4
-4
pl_editor_frame.cpp
pagelayout_editor/pl_editor_frame.cpp
+24
-3
pl_editor_frame.h
pagelayout_editor/pl_editor_frame.h
+1
-0
No files found.
pagelayout_editor/events_functions.cpp
View file @
99535864
...
...
@@ -199,9 +199,20 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_ITEM_MOVE_START_POINT
:
item
=
m_treePagelayout
->
GetPageLayoutSelectedItem
();
item
->
ClearFlags
(
LOCATE_ENDPOINT
);
MoveItem
(
item
);
break
;
case
ID_POPUP_ITEM_MOVE_END_POINT
:
item
=
m_treePagelayout
->
GetPageLayoutSelectedItem
();
item
->
ClearFlags
(
LOCATE_STARTPOINT
);
MoveItem
(
item
);
break
;
case
ID_POPUP_ITEM_MOVE
:
item
=
m_treePagelayout
->
GetPageLayoutSelectedItem
();
item
->
ClearFlags
(
LOCATE_ENDPOINT
|
LOCATE_STARTPOINT
);
MoveItem
(
item
);
break
;
...
...
pagelayout_editor/page_layout_writer.cpp
View file @
99535864
...
...
@@ -182,10 +182,10 @@ void WORKSHEET_LAYOUT_IO::Format( WORKSHEET_LAYOUT* aPageLayout ) const
// Write default values:
m_out
->
Print
(
nestLevel
,
"(%s"
,
getTokenName
(
T_setup
)
);
m_out
->
Print
(
0
,
"(textsize %s %s)"
,
double2Str
(
TB_DEFAULT_TEXTSIZE
).
c_str
(),
double2Str
(
TB_DEFAULT_TEXTSIZE
).
c_str
()
);
m_out
->
Print
(
0
,
"(linewidth %s)"
,
double2Str
(
0.15
).
c_str
()
);
m_out
->
Print
(
0
,
"(textlinewidth %s)"
,
double2Str
(
0.15
).
c_str
()
);
double2Str
(
WORKSHEET_DATAITEM
::
m_DefaultTextSize
.
x
).
c_str
(),
double2Str
(
WORKSHEET_DATAITEM
::
m_DefaultTextSize
.
y
).
c_str
()
);
m_out
->
Print
(
0
,
"(linewidth %s)"
,
double2Str
(
WORKSHEET_DATAITEM
::
m_DefaultLineWidth
).
c_str
()
);
m_out
->
Print
(
0
,
"(textlinewidth %s)"
,
double2Str
(
WORKSHEET_DATAITEM
::
m_DefaultTextThickness
).
c_str
()
);
m_out
->
Print
(
0
,
"
\n
"
);
// Write margin values
...
...
pagelayout_editor/pl_editor_frame.cpp
View file @
99535864
...
...
@@ -505,14 +505,35 @@ void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg )
void
PL_EDITOR_FRAME
::
RebuildDesignTree
()
{
const
WORKSHEET_LAYOUT
&
pglayout
=
WORKSHEET_LAYOUT
::
GetTheInstance
();
int
rectId
=
0
;
int
lineId
=
0
;
int
textId
=
0
;
int
polyId
=
0
;
for
(
unsigned
ii
=
0
;
ii
<
pglayout
.
GetCount
();
ii
++
)
{
WORKSHEET_DATAITEM
*
item
=
pglayout
.
GetItem
(
ii
);
if
(
item
->
m_Name
.
IsEmpty
()
)
switch
(
item
->
GetType
()
)
{
item
->
m_Name
=
wxString
::
Format
(
wxT
(
"item%d:%s"
),
ii
+
1
,
GetChars
(
item
->
GetClassName
())
);
case
WORKSHEET_DATAITEM
:
:
WS_TEXT
:
item
->
m_Name
=
wxString
::
Format
(
wxT
(
"text%d:%s"
),
++
textId
,
GetChars
(
item
->
GetClassName
())
);
break
;
case
WORKSHEET_DATAITEM
:
:
WS_SEGMENT
:
item
->
m_Name
=
wxString
::
Format
(
wxT
(
"segm%d:%s"
),
++
lineId
,
GetChars
(
item
->
GetClassName
())
);
break
;
case
WORKSHEET_DATAITEM
:
:
WS_RECT
:
item
->
m_Name
=
wxString
::
Format
(
wxT
(
"rect%d:%s"
),
++
rectId
,
GetChars
(
item
->
GetClassName
())
);
break
;
case
WORKSHEET_DATAITEM
:
:
WS_POLYPOLYGON
:
item
->
m_Name
=
wxString
::
Format
(
wxT
(
"poly%d:%s"
),
++
polyId
,
GetChars
(
item
->
GetClassName
())
);
break
;
}
}
...
...
pagelayout_editor/pl_editor_frame.h
View file @
99535864
...
...
@@ -322,6 +322,7 @@ public:
/**
* Initialize a move item command
* @param aItem is the item to move
*/
void
MoveItem
(
WORKSHEET_DATAITEM
*
aItem
);
...
...
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