From 7546333fbc4a0bff8b780f9c44bb7a5e9529f75d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 29 Aug 2013 09:20:09 +0200 Subject: [PATCH] Pl_Editor: fix some minor issues. --- pagelayout_editor/dialogs/properties_frame_base.cpp | 8 ++++---- pagelayout_editor/dialogs/properties_frame_base.fbp | 10 +++++----- pagelayout_editor/files.cpp | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/pagelayout_editor/dialogs/properties_frame_base.cpp b/pagelayout_editor/dialogs/properties_frame_base.cpp index bd12ffdd3f..ab6543c85b 100644 --- a/pagelayout_editor/dialogs/properties_frame_base.cpp +++ b/pagelayout_editor/dialogs/properties_frame_base.cpp @@ -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 ); diff --git a/pagelayout_editor/dialogs/properties_frame_base.fbp b/pagelayout_editor/dialogs/properties_frame_base.fbp index 7e6b956090..cdbfedd814 100644 --- a/pagelayout_editor/dialogs/properties_frame_base.fbp +++ b/pagelayout_editor/dialogs/properties_frame_base.fbp @@ -167,7 +167,7 @@ Item Properties 1 - + 1 1 1 @@ -219,7 +219,7 @@ - wxHSCROLL|wxVSCROLL + wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL @@ -1491,7 +1491,7 @@ 0 0 wxID_ANY - Text Height (mm) + Text Width (mm) 0 @@ -1676,7 +1676,7 @@ 0 0 wxID_ANY - Text Width (mm) + Text Height (mm) 0 @@ -5488,7 +5488,7 @@ - wxHSCROLL|wxVSCROLL + wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL diff --git a/pagelayout_editor/files.cpp b/pagelayout_editor/files.cpp index 8598ea9de3..45749ae016 100644 --- a/pagelayout_editor/files.cpp +++ b/pagelayout_editor/files.cpp @@ -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;