dont write updated ids if they didnt change

pull/2/head
Michail Vourlakos 7 years ago
parent 667a451499
commit 896e46dcd9

@ -955,11 +955,15 @@ QString Layout::newUniqueIdsLayoutFromFile(QString file, bool enforceNewIds)
QString fileText = in.readAll();
foreach (auto contId, toInvestigateContainmentIds) {
fileText = fileText.replace("[Containments][" + contId + "]", "[Containments][" + assigned[contId] + "]");
if (contId != assigned[contId]) {
fileText = fileText.replace("[Containments][" + contId + "]", "[Containments][" + assigned[contId] + "]");
}
}
foreach (auto appId, toInvestigateAppletIds) {
fileText = fileText.replace("][Applets][" + appId + "]", "][Applets][" + assigned[appId] + "]");
if (appId != assigned[appId]) {
fileText = fileText.replace("][Applets][" + appId + "]", "][Applets][" + assigned[appId] + "]");
}
}
f.close();

Loading…
Cancel
Save