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
04e01711
Commit
04e01711
authored
Sep 15, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a compatibility issue on wxGTK 2.8, on Linux ( Bug #1369290 )
parent
efd4c123
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
12 deletions
+42
-12
dialog_edit_component_in_schematic.cpp
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+16
-3
dialog_edit_component_in_schematic_fbp.cpp
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp
+2
-0
dialog_edit_component_in_schematic_fbp.fbp
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp
+1
-1
dialog_edit_component_in_schematic_fbp.h
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h
+1
-0
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
+16
-5
dialog_edit_libentry_fields_in_lib_base.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
+3
-1
dialog_edit_libentry_fields_in_lib_base.fbp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
+1
-1
dialog_edit_libentry_fields_in_lib_base.h
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
+2
-1
No files found.
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
04e01711
...
...
@@ -106,6 +106,7 @@ private:
void
setRowItem
(
int
aFieldNdx
,
const
SCH_FIELD
&
aField
);
// event handlers
void
OnCloseDialog
(
wxCloseEvent
&
event
);
void
OnListItemDeselected
(
wxListEvent
&
event
);
void
OnListItemSelected
(
wxListEvent
&
event
);
void
OnCancelButtonClick
(
wxCommandEvent
&
event
);
...
...
@@ -216,9 +217,21 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemSelected( wxListEvent& event
}
void
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
OnCloseDialog
(
wxCloseEvent
&
event
)
{
wxMessageBox
(
"DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCloseDialog"
);
// On wxWidgets 2.8, and on Linux, calling EndQuasiModal here is mandatory
// Otherwise, the main event loop is never restored, and Eeschema does not
// respond to any event, because the DIALOG_SHIM destructor is never called.
// on wxWidgets 3.0, or on Windows, the DIALOG_SHIM destructor is called,
// and calls EndQuasiModal.
// therefore calling EndQuasiModal here is not mandatory but it creates no issues
EndQuasiModal
(
wxID_CANCEL
);
}
void
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC
::
OnCancelButtonClick
(
wxCommandEvent
&
event
)
{
EndQuasiModal
(
1
);
EndQuasiModal
(
wxID_CANCEL
);
}
...
...
@@ -402,7 +415,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event
m_Parent
->
GetScreen
()
->
TestDanglingEnds
();
m_Parent
->
GetCanvas
()
->
Refresh
(
true
);
EndQuasiModal
(
0
);
EndQuasiModal
(
wxID_OK
);
}
...
...
@@ -1026,6 +1039,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event )
m_Cmp
->
Draw
(
m_Parent
->
GetCanvas
(),
&
dc
,
wxPoint
(
0
,
0
),
GR_DEFAULT_DRAWMODE
);
EndQuasiModal
(
1
);
EndQuasiModal
(
wxID_OK
);
}
}
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp
View file @
04e01711
...
...
@@ -280,6 +280,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
mainSizer
->
Fit
(
this
);
// Connect Events
this
->
Connect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
OnCloseDialog
)
);
defaultsButton
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
SetInitCmp
),
NULL
,
this
);
fieldListCtrl
->
Connect
(
wxEVT_COMMAND_LIST_ITEM_DESELECTED
,
wxListEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
OnListItemDeselected
),
NULL
,
this
);
fieldListCtrl
->
Connect
(
wxEVT_COMMAND_LIST_ITEM_SELECTED
,
wxListEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
OnListItemSelected
),
NULL
,
this
);
...
...
@@ -294,6 +295,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::~
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
()
{
// Disconnect Events
this
->
Disconnect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
OnCloseDialog
)
);
defaultsButton
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
SetInitCmp
),
NULL
,
this
);
fieldListCtrl
->
Disconnect
(
wxEVT_COMMAND_LIST_ITEM_DESELECTED
,
wxListEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
OnListItemDeselected
),
NULL
,
this
);
fieldListCtrl
->
Disconnect
(
wxEVT_COMMAND_LIST_ITEM_SELECTED
,
wxListEventHandler
(
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
::
OnListItemSelected
),
NULL
,
this
);
...
...
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp
View file @
04e01711
...
...
@@ -61,7 +61,7 @@
<event
name=
"OnAuiPaneRestore"
></event>
<event
name=
"OnAuiRender"
></event>
<event
name=
"OnChar"
></event>
<event
name=
"OnClose"
></event>
<event
name=
"OnClose"
>
OnCloseDialog
</event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnHibernate"
></event>
...
...
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h
View file @
04e01711
...
...
@@ -81,6 +81,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
wxButton
*
stdDialogButtonSizerCancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnCloseDialog
(
wxCloseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
SetInitCmp
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnListItemDeselected
(
wxListEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnListItemSelected
(
wxListEvent
&
event
)
{
event
.
Skip
();
}
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
04e01711
...
...
@@ -60,6 +60,7 @@ public:
private
:
// Events handlers:
void
OnInitDialog
(
wxInitDialogEvent
&
event
);
void
OnCloseDialog
(
wxCloseEvent
&
event
);
void
OnListItemDeselected
(
wxListEvent
&
event
);
void
OnListItemSelected
(
wxListEvent
&
event
);
...
...
@@ -146,9 +147,7 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
// frame. Therefore this dialog as a modal frame parent, MUST be run under
// quasimodal mode for the quasimodal frame support to work. So don't use
// the QUASIMODAL macros here.
int
abort
=
dlg
.
ShowQuasiModal
();
if
(
abort
)
if
(
dlg
.
ShowQuasiModal
()
!=
wxID_OK
)
return
;
UpdateAliasSelectList
();
...
...
@@ -216,7 +215,19 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnListItemSelected( wxListEvent& event
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
OnCancelButtonClick
(
wxCommandEvent
&
event
)
{
EndQuasiModal
(
1
);
EndQuasiModal
(
wxID_CANCEL
);
}
void
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
::
OnCloseDialog
(
wxCloseEvent
&
event
)
{
// On wxWidgets 2.8, and on Linux, call EndQuasiModal here is mandatory
// Otherwise, the main event loop is never restored, and Eeschema does not
// respond to any event, because the DIALOG_SHIM destructor is never called.
// on wxWidgets 3.0, or on Windows, the DIALOG_SHIM destructor is called,
// and calls EndQuasiModal.
// Therefore calling EndQuasiModal here is not mandatory but it creates no issues.
EndQuasiModal
(
wxID_CANCEL
);
}
...
...
@@ -287,7 +298,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event
m_parent
->
OnModify
();
EndQuasiModal
(
0
);
EndQuasiModal
(
wxID_OK
);
}
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
View file @
04e01711
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov
5
2013)
// C++ code generated with wxFormBuilder (version Nov
6
2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -202,6 +202,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
mainSizer
->
Fit
(
this
);
// Connect Events
this
->
Connect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnCloseDialog
)
);
this
->
Connect
(
wxEVT_INIT_DIALOG
,
wxInitDialogEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnInitDialog
)
);
fieldListCtrl
->
Connect
(
wxEVT_COMMAND_LIST_ITEM_DESELECTED
,
wxListEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnListItemDeselected
),
NULL
,
this
);
fieldListCtrl
->
Connect
(
wxEVT_COMMAND_LIST_ITEM_SELECTED
,
wxListEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnListItemSelected
),
NULL
,
this
);
...
...
@@ -216,6 +217,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::~
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
()
{
// Disconnect Events
this
->
Disconnect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnCloseDialog
)
);
this
->
Disconnect
(
wxEVT_INIT_DIALOG
,
wxInitDialogEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnInitDialog
)
);
fieldListCtrl
->
Disconnect
(
wxEVT_COMMAND_LIST_ITEM_DESELECTED
,
wxListEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnListItemDeselected
),
NULL
,
this
);
fieldListCtrl
->
Disconnect
(
wxEVT_COMMAND_LIST_ITEM_SELECTED
,
wxListEventHandler
(
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
::
OnListItemSelected
),
NULL
,
this
);
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
View file @
04e01711
...
...
@@ -61,7 +61,7 @@
<event
name=
"OnAuiPaneRestore"
></event>
<event
name=
"OnAuiRender"
></event>
<event
name=
"OnChar"
></event>
<event
name=
"OnClose"
></event>
<event
name=
"OnClose"
>
OnCloseDialog
</event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnHibernate"
></event>
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
View file @
04e01711
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov
5
2013)
// C++ code generated with wxFormBuilder (version Nov
6
2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -70,6 +70,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public DIALOG_SHIM
wxButton
*
stdDialogButtonSizerCancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnCloseDialog
(
wxCloseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnInitDialog
(
wxInitDialogEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnListItemDeselected
(
wxListEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnListItemSelected
(
wxListEvent
&
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