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
49538caf
Commit
49538caf
authored
Aug 17, 2014
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https://lists.launchpad.net/kicad-developers/msg14286.html
parent
9de02e88
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
368 additions
and
122 deletions
+368
-122
dialog_shim.cpp
common/dialog_shim.cpp
+335
-94
kiway_player.cpp
common/kiway_player.cpp
+1
-8
dialog_edit_component_in_schematic.cpp
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+4
-0
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
+4
-0
dialog_shim.h
include/dialog_shim.h
+14
-8
dialog_edit_module_for_BoardEditor.cpp
pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
+4
-6
editmod.cpp
pcbnew/editmod.cpp
+6
-6
No files found.
common/dialog_shim.cpp
View file @
49538caf
This diff is collapsed.
Click to expand it.
common/kiway_player.cpp
View file @
49538caf
...
...
@@ -106,13 +106,6 @@ bool KIWAY_PLAYER::ShowModal( wxString* aResult, wxWindow* aResultantFocusWindow
WX_EVENT_LOOP
event_loop
;
#if wxCHECK_VERSION( 2, 9, 4 ) // 2.9.4 is only approximate.
// new code needs this, old code does it in wxEventLoop::Run() and cannot
// tolerate it here. Where that boundary is as a version number, I don't know.
// A closer look at the subversion repo for wx would tell.
wxEventLoopActivator
event_loop_stacker
(
&
event_loop
);
#endif
m_modal_loop
=
&
event_loop
;
event_loop
.
Run
();
...
...
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
49538caf
...
...
@@ -148,6 +148,10 @@ void SCH_EDIT_FRAME::EditComponent( SCH_COMPONENT* aComponent )
// make sure the chipnameTextCtrl is wide enough to hold any unusually long chip names:
EnsureTextCtrlWidth
(
dlg
->
chipnameTextCtrl
);
// This dialog itself subsequently can invoke a KIWAY_PLAYER as a quasimodal
// 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.
dlg
->
ShowQuasiModal
();
m_canvas
->
SetIgnoreMouseEvents
(
false
);
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
49538caf
...
...
@@ -142,6 +142,10 @@ void LIB_EDIT_FRAME::InstallFieldsEditorDialog( wxCommandEvent& event )
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB
dlg
(
this
,
GetCurPart
()
);
// This dialog itself subsequently can invoke a KIWAY_PLAYER as a quasimodal
// 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
)
...
...
include/dialog_shim.h
View file @
49538caf
...
...
@@ -35,14 +35,20 @@
#define DLGSHIM_USE_SETFOCUS 0
#endif
#if wxCHECK_VERSION( 2, 9, 4 )
#define WX_EVENT_LOOP wxGUIEventLoop
class
WDO_ENABLE_DISABLE
;
class
EVENT_LOOP
;
// These macros are for DIALOG_SHIM only, NOT for KIWAY_PLAYER. KIWAY_PLAYER
// has its own support for quasi modal and its platform specific issues are different
// than for a wxDialog.
#if wxCHECK_VERSION( 3, 0, 0 )
#define SHOWQUASIMODAL ShowQuasiModal
#define ENDQUASIMODAL EndQuasiModal
#else
#define WX_EVENT_LOOP wxEventLoop
#define SHOWQUASIMODAL ShowModal
#define ENDQUASIMODAL EndModal
#endif
class
WX_EVENT_LOOP
;
/**
* Class DIALOG_SHIM
...
...
@@ -86,9 +92,9 @@ protected:
std
::
string
m_hash_key
;
// alternate for class_map when classname re-used.
// variables for quasi-modal behavior support, only used by a few derivatives.
WX_EVENT_LOOP
*
m_qmodal_loop
;
// points to nested event_loop, NULL means not qmodal and dismissed
EVENT_LOOP
*
m_qmodal_loop
;
// points to nested event_loop, NULL means not qmodal and dismissed
bool
m_qmodal_showing
;
WDO_ENABLE_DISABLE
*
m_qmodal_parent_disabler
;
#if DLGSHIM_USE_SETFOCUS
private
:
...
...
pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
View file @
49538caf
...
...
@@ -182,7 +182,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
void
DIALOG_MODULE_BOARD_EDITOR
::
OnCancelClick
(
wxCommandEvent
&
event
)
{
E
ndModal
(
-
1
);
E
NDQUASIMODAL
(
-
1
);
}
...
...
@@ -194,7 +194,7 @@ void DIALOG_MODULE_BOARD_EDITOR::GotoModuleEditor( wxCommandEvent& event )
m_Parent
->
OnModify
();
}
E
ndModal
(
2
);
E
NDQUASIMODAL
(
2
);
}
...
...
@@ -204,7 +204,7 @@ void DIALOG_MODULE_BOARD_EDITOR::ExchangeModule( wxCommandEvent& event )
// Warning: m_CurrentModule was deleted by exchange module
m_Parent
->
SetCurItem
(
NULL
);
E
ndModal
(
0
);
E
NDQUASIMODAL
(
0
);
}
...
...
@@ -241,8 +241,6 @@ void DIALOG_MODULE_BOARD_EDITOR::ModuleOrientEvent( wxCommandEvent& event )
void
DIALOG_MODULE_BOARD_EDITOR
::
InitModeditProperties
()
{
SetFocus
();
wxString
default_path
;
wxGetEnv
(
wxT
(
KISYS3DMOD
),
&
default_path
);
#ifdef __WINDOWS__
...
...
@@ -675,7 +673,7 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
m_Parent
->
OnModify
();
E
ndModal
(
1
);
E
NDQUASIMODAL
(
1
);
if
(
m_DC
)
{
...
...
pcbnew/editmod.cpp
View file @
49538caf
...
...
@@ -59,7 +59,7 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC )
DIALOG_MODULE_BOARD_EDITOR
*
dialog
=
new
DIALOG_MODULE_BOARD_EDITOR
(
this
,
Module
,
NULL
);
#endif
int
retvalue
=
dialog
->
S
howModal
();
/* retvalue =
int
retvalue
=
dialog
->
S
HOWQUASIMODAL
();
/* retvalue =
* -1 if abort,
* 0 if exchange module,
* 1 for normal edition
...
...
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