From 0face5a891bbd42377efe7ea017023109404af66 Mon Sep 17 00:00:00 2001 From: Jon Evans <jon@craftyjon.com> Date: Sat, 18 Nov 2023 18:54:15 -0500 Subject: [PATCH] Add prettification to pl_editor; bump version --- common/drawing_sheet/ds_data_model_io.cpp | 6 +++--- include/drawing_sheet/ds_file_versions.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/drawing_sheet/ds_data_model_io.cpp b/common/drawing_sheet/ds_data_model_io.cpp index cae54b74b6..b1c8886f8c 100644 --- a/common/drawing_sheet/ds_data_model_io.cpp +++ b/common/drawing_sheet/ds_data_model_io.cpp @@ -86,7 +86,7 @@ public: { try { - m_fileout = new FILE_OUTPUTFORMATTER( aFilename ); + m_fileout = new PRETTIFIED_FILE_OUTPUTFORMATTER( aFilename ); m_out = m_fileout; } catch( const IO_ERROR& ioe ) @@ -101,7 +101,7 @@ public: } private: - FILE_OUTPUTFORMATTER* m_fileout; + PRETTIFIED_FILE_OUTPUTFORMATTER* m_fileout; }; @@ -203,7 +203,7 @@ void DS_DATA_MODEL_IO::Format( DS_DATA_MODEL* aSheet ) const LOCALE_IO toggle; // switch on/off the locale "C" notation m_out->Print( 0, "(kicad_wks (version %d) (generator \"pl_editor\") (generator_version \"%s\")\n", - SEXPR_WORKSHEET_FILE_VERSION, GetMajorMinorVersion() ); + SEXPR_WORKSHEET_FILE_VERSION, GetMajorMinorVersion().c_str().AsChar() ); // Setup int nestLevel = 1; diff --git a/include/drawing_sheet/ds_file_versions.h b/include/drawing_sheet/ds_file_versions.h index a013399ed8..258e18b6f0 100644 --- a/include/drawing_sheet/ds_file_versions.h +++ b/include/drawing_sheet/ds_file_versions.h @@ -32,4 +32,5 @@ //#define SEXPR_WORKSHEET_FILE_VERSION 20210606 // Initial version. //#define SEXPR_WORKSHEET_FILE_VERSION 20220228 // Font support. -#define SEXPR_WORKSHEET_FILE_VERSION 20230607 // Save images as base64. +//#define SEXPR_WORKSHEET_FILE_VERSION 20230607 // Save images as base64. +#define SEXPR_WORKSHEET_FILE_VERSION 20231118 // Generator version; V8 file format cleanup