1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 15:45:33 +00:00
openmw-tes3mp/apps/opencs/model/tools/mergeoperation.cpp
Marc Zinnschlag 55dfe48ef7 copy meta data from game file when merging
(cherry picked from commit 47dd9505a9)

Conflicts:
	apps/opencs/model/doc/document.cpp
	apps/opencs/model/world/data.cpp
2015-11-01 13:34:41 +11:00

26 lines
649 B
C++

#include "mergeoperation.hpp"
#include "../doc/state.hpp"
#include "../doc/document.hpp"
#include "mergestages.hpp"
CSMTools::MergeOperation::MergeOperation (CSMDoc::Document& document, ToUTF8::FromType encoding)
: CSMDoc::Operation (CSMDoc::State_Merging, true), mState (document)
{
appendStage (new FinishMergedDocumentStage (mState, encoding));
}
void CSMTools::MergeOperation::setTarget (std::auto_ptr<CSMDoc::Document> document)
{
mState.mTarget = document;
}
void CSMTools::MergeOperation::operationDone()
{
CSMDoc::Operation::operationDone();
if (mState.mCompleted)
emit mergeDone (mState.mTarget.release());
}