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
2b394c7c
Commit
2b394c7c
authored
Jan 23, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog_page_settings needed right border space, retain last dialog size and position
parent
b8a0ab4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
2 deletions
+46
-2
dialog_page_settings.cpp
common/dialogs/dialog_page_settings.cpp
+33
-0
dialog_page_settings.h
common/dialogs/dialog_page_settings.h
+11
-0
dialog_page_settings_base.cpp
common/dialogs/dialog_page_settings_base.cpp
+1
-1
dialog_page_settings_base.fbp
common/dialogs/dialog_page_settings_base.fbp
+1
-1
No files found.
common/dialogs/dialog_page_settings.cpp
View file @
2b394c7c
...
...
@@ -26,6 +26,10 @@
#include <dialog_page_settings.h>
// dialog should remember its previous screen position and size
wxPoint
DIALOG_PAGES_SETTINGS
::
s_LastPos
(
-
1
,
-
1
);
wxSize
DIALOG_PAGES_SETTINGS
::
s_LastSize
;
void
EDA_DRAW_FRAME
::
Process_PageSettings
(
wxCommandEvent
&
event
)
{
...
...
@@ -163,6 +167,35 @@ void DIALOG_PAGES_SETTINGS::initDialog()
}
bool
DIALOG_PAGES_SETTINGS
::
Show
(
bool
show
)
{
bool
ret
;
if
(
show
)
{
ret
=
DIALOG_PAGES_SETTINGS_BASE
::
Show
(
show
);
if
(
s_LastPos
.
x
!=
-
1
)
{
SetSize
(
s_LastPos
.
x
,
s_LastPos
.
y
,
s_LastSize
.
x
,
s_LastSize
.
y
,
0
);
}
else
{
// Do nothing: last position not yet saved.
}
}
else
{
// Save the dialog's position before hiding
s_LastPos
=
GetPosition
();
s_LastSize
=
GetSize
();
ret
=
DIALOG_PAGES_SETTINGS_BASE
::
Show
(
show
);
}
return
ret
;
}
void
DIALOG_PAGES_SETTINGS
::
OnCloseWindow
(
wxCloseEvent
&
event
)
{
EndModal
(
m_modified
);
...
...
common/dialogs/dialog_page_settings.h
View file @
2b394c7c
...
...
@@ -19,10 +19,21 @@ private:
bool
m_modified
;
PAGE_INFO
m_user_size
;
///< instantiated just to get the size
static
wxSize
s_LastSize
;
///< last position and size
static
wxPoint
s_LastPos
;
public
:
DIALOG_PAGES_SETTINGS
(
EDA_DRAW_FRAME
*
parent
);
~
DIALOG_PAGES_SETTINGS
();
/**
* Function Show
* overloads the wxDialog::Show() function so it can position the
* dialog at its remembered size and position.
*/
bool
Show
(
bool
show
);
private
:
/// Initialises member variables
void
initDialog
();
...
...
common/dialogs/dialog_page_settings_base.cpp
View file @
2b394c7c
...
...
@@ -201,7 +201,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
RightColumnSizer
->
Add
(
Comment4Sizer
,
1
,
wxEXPAND
,
5
);
bUpperSizerH
->
Add
(
RightColumnSizer
,
1
,
wxEXPAND
,
5
);
bUpperSizerH
->
Add
(
RightColumnSizer
,
1
,
wx
ALL
|
wx
EXPAND
,
5
);
bMainSizer
->
Add
(
bUpperSizerH
,
1
,
wxEXPAND
,
5
);
...
...
common/dialogs/dialog_page_settings_base.fbp
View file @
2b394c7c
...
...
@@ -746,7 +746,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"flag"
>
wx
ALL|wx
EXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxFlexGridSizer"
expanded=
"1"
>
<property
name=
"cols"
>
1
</property>
...
...
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