Fix document settings been overwritten by importing [skip ci]

master
huxingyi 2020-04-16 18:48:41 +09:30
parent 420a5997ea
commit 580e31c8aa
1 changed files with 2 additions and 1 deletions

View File

@ -1467,7 +1467,8 @@ void Document::addFromSnapshot(const Snapshot &snapshot, enum SnapshotSource sou
{ {
bool isOriginChanged = false; bool isOriginChanged = false;
bool isRigTypeChanged = false; bool isRigTypeChanged = false;
if (SnapshotSource::Paste != source) { if (SnapshotSource::Paste != source &&
SnapshotSource::Import != source) {
this->polyCount = PolyCountFromString(valueOfKeyInMapOrEmpty(snapshot.canvas, "polyCount").toUtf8().constData()); this->polyCount = PolyCountFromString(valueOfKeyInMapOrEmpty(snapshot.canvas, "polyCount").toUtf8().constData());
const auto &originXit = snapshot.canvas.find("originX"); const auto &originXit = snapshot.canvas.find("originX");
const auto &originYit = snapshot.canvas.find("originY"); const auto &originYit = snapshot.canvas.find("originY");