Pl_Editor: fix some minor issues.

This commit is contained in:
jean-pierre charras 2013-08-29 09:20:09 +02:00
parent 90029a4e1f
commit 51eaeccf03
3 changed files with 13 additions and 9 deletions

View File

@ -15,7 +15,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
bSizerpanel = new wxBoxSizer( wxVERTICAL );
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_swItemProperties = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_swItemProperties = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL );
m_swItemProperties->SetScrollRate( 5, 5 );
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
@ -121,7 +121,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerTsizeX;
bSizerTsizeX = new wxBoxSizer( wxVERTICAL );
m_staticTexTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Height (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTexTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Width (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTexTsizeX->Wrap( -1 );
bSizerTsizeX->Add( m_staticTexTsizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
@ -134,7 +134,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerTsizeY;
bSizerTsizeY = new wxBoxSizer( wxVERTICAL );
m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Width (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Height (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTsizeY->Wrap( -1 );
bSizerTsizeY->Add( m_staticTextTsizeY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
@ -436,7 +436,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
m_swItemProperties->Layout();
bSizerMain->Fit( m_swItemProperties );
m_notebook->AddPage( m_swItemProperties, _("Item Properties"), true );
m_swGeneralOpts = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_swGeneralOpts = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL );
m_swGeneralOpts->SetScrollRate( 5, 5 );
wxBoxSizer* bSizerGeneralOpts;
bSizerGeneralOpts = new wxBoxSizer( wxVERTICAL );

View File

@ -167,7 +167,7 @@
<property name="bitmap"></property>
<property name="label">Item Properties</property>
<property name="select">1</property>
<object class="wxScrolledWindow" expanded="0">
<object class="wxScrolledWindow" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@ -219,7 +219,7 @@
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxHSCROLL|wxVSCROLL</property>
<property name="window_style">wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
@ -1491,7 +1491,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text Height (mm)</property>
<property name="label">Text Width (mm)</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1676,7 +1676,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text Width (mm)</property>
<property name="label">Text Height (mm)</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -5488,7 +5488,7 @@
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxHSCROLL|wxVSCROLL</property>
<property name="window_style">wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>

View File

@ -185,6 +185,10 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
return;
filename = openFileDialog.GetPath();
// Ensure the file has the right extension:
wxFileName fn(filename);
fn.SetExt( PageLayoutDescrFileExtension );
filename = fn.GetFullPath();
if( !SavePageLayoutDescrFile( filename ) )
{
wxString msg;