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
bf97bf89
Commit
bf97bf89
authored
Oct 05, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AutoSizeColumns(), and search for "(fp_lib_table" not "(fp_lib_table "
parent
a90975d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
dialog_fp_lib_table.cpp
pcbnew/dialogs/dialog_fp_lib_table.cpp
+9
-6
No files found.
pcbnew/dialogs/dialog_fp_lib_table.cpp
View file @
bf97bf89
...
@@ -236,11 +236,12 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
...
@@ -236,11 +236,12 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
enum
enum
{
{
MYID_CUT
,
// = wxID_HIGHEST + 1,
MYID_FIRST
=
-
1
,
MYID_CUT
,
MYID_COPY
,
MYID_COPY
,
MYID_PASTE
,
MYID_PASTE
,
MYID_SELECT
,
MYID_SELECT
,
MYID_
SENTINEL
,
MYID_
LAST
,
};
};
// row & col "selection" acquisition
// row & col "selection" acquisition
...
@@ -361,13 +362,14 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
...
@@ -361,13 +362,14 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
wxTheClipboard
->
SetData
(
new
wxTextDataObject
(
txt
)
);
wxTheClipboard
->
SetData
(
new
wxTextDataObject
(
txt
)
);
wxTheClipboard
->
Close
();
wxTheClipboard
->
Close
();
m_cur_grid
->
AutoSizeColumns
();
m_cur_grid
->
ForceRefresh
();
m_cur_grid
->
ForceRefresh
();
}
}
}
}
void
paste
()
void
paste
()
{
{
D
(
printf
(
"paste
\n
"
);)
// assume format came from a spreadsheet or us.
// assume format came from a spreadsheet or us.
if
(
wxTheClipboard
->
Open
()
)
if
(
wxTheClipboard
->
Open
()
)
{
{
...
@@ -379,7 +381,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
...
@@ -379,7 +381,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
wxTheClipboard
->
GetData
(
data
);
wxTheClipboard
->
GetData
(
data
);
wxString
cb_text
=
data
.
GetText
();
wxString
cb_text
=
data
.
GetText
();
size_t
ndx
=
cb_text
.
find
(
wxT
(
"(fp_lib_table
"
)
);
size_t
ndx
=
cb_text
.
find
(
wxT
(
"(fp_lib_table"
)
);
if
(
ndx
!=
std
::
string
::
npos
)
if
(
ndx
!=
std
::
string
::
npos
)
{
{
...
@@ -440,6 +442,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
...
@@ -440,6 +442,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE
tbl
->
SetValue
(
row
,
col
,
cellTxt
);
tbl
->
SetValue
(
row
,
col
,
cellTxt
);
}
}
}
}
m_cur_grid
->
AutoSizeColumns
();
}
}
}
}
...
@@ -865,7 +868,7 @@ public:
...
@@ -865,7 +868,7 @@ public:
m_global_grid
->
AutoSizeColumns
();
m_global_grid
->
AutoSizeColumns
();
m_project_grid
->
AutoSizeColumns
();
m_project_grid
->
AutoSizeColumns
();
Connect
(
MYID_
CUT
,
MYID_SENTINEL
-
1
,
wxEVT_COMMAND_MENU_SELECTED
,
Connect
(
MYID_
FIRST
,
MYID_LAST
,
wxEVT_COMMAND_MENU_SELECTED
,
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE
::
onPopupSelection
),
NULL
,
this
);
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE
::
onPopupSelection
),
NULL
,
this
);
populateEnvironReadOnlyTable
();
populateEnvironReadOnlyTable
();
...
@@ -884,7 +887,7 @@ public:
...
@@ -884,7 +887,7 @@ public:
~
DIALOG_FP_LIB_TABLE
()
~
DIALOG_FP_LIB_TABLE
()
{
{
Disconnect
(
MYID_
CUT
,
MYID_SENTINEL
-
1
,
wxEVT_COMMAND_MENU_SELECTED
,
Disconnect
(
MYID_
FIRST
,
MYID_LAST
,
wxEVT_COMMAND_MENU_SELECTED
,
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE
::
onPopupSelection
),
NULL
,
this
);
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE
::
onPopupSelection
),
NULL
,
this
);
// ~wxGrid() examines its table, and the tables will have been destroyed before
// ~wxGrid() examines its table, and the tables will have been destroyed before
...
...
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