From 23e969eae708b67a7d94edb1e1d565d12c425cf5 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 10 Oct 2014 15:29:21 +0200 Subject: [PATCH] fixed pathgrid saving again (previous fix was incomplete) --- apps/opencs/model/doc/saving.cpp | 4 ++-- apps/opencs/model/doc/savingstages.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/opencs/model/doc/saving.cpp b/apps/opencs/model/doc/saving.cpp index 08a249cfa..70e9e1d87 100644 --- a/apps/opencs/model/doc/saving.cpp +++ b/apps/opencs/model/doc/saving.cpp @@ -78,8 +78,6 @@ CSMDoc::Saving::Saving (Document& document, const boost::filesystem::path& proje appendStage (new WriteCollectionStage > (mDocument.getData().getMagicEffects(), mState)); - appendStage (new WritePathgridCollectionStage (mDocument, mState)); - appendStage (new WriteDialogueCollectionStage (mDocument, mState, false)); appendStage (new WriteDialogueCollectionStage (mDocument, mState, true)); @@ -90,6 +88,8 @@ CSMDoc::Saving::Saving (Document& document, const boost::filesystem::path& proje appendStage (new WriteCellCollectionStage (mDocument, mState)); + appendStage (new WritePathgridCollectionStage (mDocument, mState)); + // close file and clean up appendStage (new CloseSaveStage (mState)); diff --git a/apps/opencs/model/doc/savingstages.cpp b/apps/opencs/model/doc/savingstages.cpp index 0d0805803..08f8c9eaa 100644 --- a/apps/opencs/model/doc/savingstages.cpp +++ b/apps/opencs/model/doc/savingstages.cpp @@ -337,6 +337,8 @@ void CSMDoc::WritePathgridCollectionStage::perform (int stage, Messages& message char ignore; stream >> ignore >> record.mData.mX >> record.mData.mY; } + else + record.mCell = record.mId; mState.getWriter().startRecord (record.sRecordId);