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
cb3e36f0
Commit
cb3e36f0
authored
Apr 19, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
fix bug 765355
parents
86b6feb9
320d01f6
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
378 additions
and
45 deletions
+378
-45
dialog_edit_component_in_schematic.cpp
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+13
-14
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
+3
-5
dialog_lib_edit_text.cpp
eeschema/dialogs/dialog_lib_edit_text.cpp
+4
-5
dialog_lib_edit_text_base.cpp
eeschema/dialogs/dialog_lib_edit_text_base.cpp
+12
-12
dialog_lib_edit_text_base.fbp
eeschema/dialogs/dialog_lib_edit_text_base.fbp
+341
-4
dialog_lib_edit_text_base.h
eeschema/dialogs/dialog_lib_edit_text_base.h
+5
-5
No files found.
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
cb3e36f0
...
...
@@ -22,8 +22,6 @@
int
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_SelectedRow
;
wxSize
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
=
wxDefaultSize
;
...
...
@@ -36,37 +34,38 @@ void InstallCmpeditFrame( SCH_EDIT_FRAME* aParent, SCH_COMPONENT* aComponent )
if
(
aComponent
->
Type
()
!=
SCH_COMPONENT_T
)
{
DisplayError
(
aParent
,
wxT
(
"InstallCmpeditFrame() error: This item is not a component"
)
);
wxMessageBox
(
wxT
(
"InstallCmpeditFrame() error: This item is not a component"
)
);
return
;
}
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
dialog
(
aParent
);
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
*
dlg
=
new
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
(
aParent
);
d
ialog
.
InitBuffers
(
aComponent
);
d
lg
->
InitBuffers
(
aComponent
);
wxSize
sizeNow
=
d
ialog
.
GetSize
();
wxSize
sizeNow
=
d
lg
->
GetSize
();
// this relies on wxDefaultSize being -1,-1, be careful here.
if
(
sizeNow
.
GetWidth
()
<
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
.
GetWidth
()
||
sizeNow
.
GetHeight
()
<
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
.
GetHeight
()
)
{
d
ialog
.
SetSize
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
);
d
lg
->
SetSize
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
);
}
// make sure the chipnameTextCtrl is wide enough to hold any
// unusually long chip names:
EnsureTextCtrlWidth
(
d
ialog
.
chipnameTextCtrl
);
EnsureTextCtrlWidth
(
d
lg
->
chipnameTextCtrl
);
d
ialog
.
ShowModal
();
d
lg
->
ShowModal
();
// Some of the field values are long and are not always fully visible because the
// window comes up too narrow. Remember user's manual window resizing efforts here
// so it comes up wide enough next time.
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
=
d
ialog
.
GetSize
();
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
s_LastSize
=
d
lg
->
GetSize
();
aParent
->
DrawPanel
->
MoveCursorToCrossHair
();
aParent
->
DrawPanel
->
m_IgnoreMouseEvents
=
false
;
dlg
->
Destroy
();
}
...
...
@@ -153,15 +152,15 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
newname
.
Replace
(
wxT
(
" "
),
wxT
(
"_"
)
);
if
(
newname
.
IsEmpty
()
)
DisplayError
(
this
,
_
(
"No Component Name!"
)
);
DisplayError
(
NULL
,
_
(
"No Component Name!"
)
);
else
if
(
newname
.
CmpNoCase
(
m_Cmp
->
m_ChipName
)
)
{
if
(
CMP_LIBRARY
::
FindLibraryEntry
(
newname
)
==
NULL
)
{
wxString
message
;
message
.
Printf
(
_
(
"Component [%s] not found!"
),
newname
.
GetData
(
)
);
DisplayError
(
this
,
message
);
message
.
Printf
(
_
(
"Component [%s] not found!"
),
GetChars
(
newname
)
);
DisplayError
(
NULL
,
message
);
}
else
// Change component from lib!
{
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
cb3e36f0
...
...
@@ -135,6 +135,9 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB(
{
m_Parent
=
aParent
;
m_LibEntry
=
aLibEntry
;
GetSizer
()
->
SetSizeHints
(
this
);
Centre
();
}
...
...
@@ -176,11 +179,6 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog( wxInitDialogEvent& event
InitBuffers
();
copySelectedFieldToPanel
();
if
(
GetSizer
()
)
{
GetSizer
()
->
SetSizeHints
(
this
);
}
stdDialogButtonSizerOK
->
SetDefault
();
}
...
...
eeschema/dialogs/dialog_lib_edit_text.cpp
View file @
cb3e36f0
...
...
@@ -102,12 +102,11 @@ void DIALOG_LIB_EDIT_TEXT::InitDialog( )
msg
=
m_TextSizeText
->
GetLabel
()
+
ReturnUnitSymbol
();
m_TextSizeText
->
SetLabel
(
msg
);
if
(
GetSizer
())
{
GetSizer
()
->
SetSizeHints
(
this
);
}
m_sdbSizer1OK
->
SetDefault
();
Centre
();
m_sdbSizerButtonsOK
->
SetDefault
();
}
...
...
eeschema/dialogs/dialog_lib_edit_text_base.cpp
View file @
cb3e36f0
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Sep 8
2010)
// C++ code generated with wxFormBuilder (version
Nov 17
2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -97,27 +97,27 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
bMainSizer
->
Add
(
bPropertiesSizer
,
1
,
wxEXPAND
|
wxLEFT
|
wxRIGHT
|
wxTOP
,
6
);
m_sdbSizer
1
=
new
wxStdDialogButtonSizer
();
m_sdbSizer
1
OK
=
new
wxButton
(
this
,
wxID_OK
);
m_sdbSizer
1
->
AddButton
(
m_sdbSizer1
OK
);
m_sdbSizer
1
Cancel
=
new
wxButton
(
this
,
wxID_CANCEL
);
m_sdbSizer
1
->
AddButton
(
m_sdbSizer1
Cancel
);
m_sdbSizer
1
->
Realize
();
bMainSizer
->
Add
(
m_sdbSizer
1
,
0
,
wxALL
|
wxEXPAND
,
12
);
m_sdbSizer
Buttons
=
new
wxStdDialogButtonSizer
();
m_sdbSizer
Buttons
OK
=
new
wxButton
(
this
,
wxID_OK
);
m_sdbSizer
Buttons
->
AddButton
(
m_sdbSizerButtons
OK
);
m_sdbSizer
Buttons
Cancel
=
new
wxButton
(
this
,
wxID_CANCEL
);
m_sdbSizer
Buttons
->
AddButton
(
m_sdbSizerButtons
Cancel
);
m_sdbSizer
Buttons
->
Realize
();
bMainSizer
->
Add
(
m_sdbSizer
Buttons
,
0
,
wxALL
|
wxEXPAND
,
12
);
this
->
SetSizer
(
bMainSizer
);
this
->
Layout
();
bMainSizer
->
Fit
(
this
);
// Connect Events
m_sdbSizer
1
Cancel
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer
1
OK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnOkClick
),
NULL
,
this
);
m_sdbSizer
Buttons
Cancel
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer
Buttons
OK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnOkClick
),
NULL
,
this
);
}
DIALOG_LIB_EDIT_TEXT_BASE
::~
DIALOG_LIB_EDIT_TEXT_BASE
()
{
// Disconnect Events
m_sdbSizer
1
Cancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer
1
OK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnOkClick
),
NULL
,
this
);
m_sdbSizer
Buttons
Cancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer
Buttons
OK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LIB_EDIT_TEXT_BASE
::
OnOkClick
),
NULL
,
this
);
}
eeschema/dialogs/dialog_lib_edit_text_base.fbp
View file @
cb3e36f0
This diff is collapsed.
Click to expand it.
eeschema/dialogs/dialog_lib_edit_text_base.h
View file @
cb3e36f0
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Sep 8
2010)
// C++ code generated with wxFormBuilder (version
Nov 17
2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -46,9 +46,9 @@ class DIALOG_LIB_EDIT_TEXT_BASE : public wxDialog
wxRadioBox
*
m_TextShapeOpt
;
wxRadioBox
*
m_TextHJustificationOpt
;
wxRadioBox
*
m_TextVJustificationOpt
;
wxStdDialogButtonSizer
*
m_sdbSizer
1
;
wxButton
*
m_sdbSizer
1
OK
;
wxButton
*
m_sdbSizer
1
Cancel
;
wxStdDialogButtonSizer
*
m_sdbSizer
Buttons
;
wxButton
*
m_sdbSizer
Buttons
OK
;
wxButton
*
m_sdbSizer
Buttons
Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
...
...
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