Core: Revert superfluous changes made with PR #9521

This commit is contained in:
wmayer
2023-10-08 03:01:40 +02:00
committed by wwmayer
parent 22aa20c9e0
commit d305f306df
84 changed files with 265 additions and 1884 deletions

View File

@@ -23,7 +23,6 @@
#include "PreCompiled.h"
#include <Base/Console.h>
#include <Base/DocumentReader.h>
#include <Base/Interpreter.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
@@ -92,36 +91,6 @@ void PropertyVisualLayerList::Restore(Base::XMLReader& reader)
setValues(std::move(layers));
}
void PropertyVisualLayerList::Restore(Base::DocumentReader& reader,
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* containerEl)
{
auto Prop_VisualLayerListDOM =
reader.FindElementByField(containerEl, "Property", "name", "VisualLayerList");
if (Prop_VisualLayerListDOM) {
auto VisualLayerListDOM = reader.FindElement(Prop_VisualLayerListDOM, "VisualLayerList");
const char* count_cstr = reader.GetAttribute(VisualLayerListDOM, "count");
if (count_cstr) {
int count = reader.ContentToInt(count_cstr);
std::vector<VisualLayer> layers;
layers.reserve(count);
auto prev_VisualLayerDOM = reader.FindElement(VisualLayerListDOM, "VisualLayer");
VisualLayer visualLayer;
visualLayer.Restore(reader, prev_VisualLayerDOM);
layers.push_back(std::move(visualLayer));
for (int i = 1; i < count; i++) {
auto VisualLayerDOM_i = reader.FindNextElement(prev_VisualLayerDOM, "VisualLayer");
VisualLayer visualLayer;
visualLayer.Restore(reader, VisualLayerDOM_i);
layers.push_back(std::move(visualLayer));
prev_VisualLayerDOM = VisualLayerDOM_i;
}
setValues(std::move(layers));
}
}
}
Property* PropertyVisualLayerList::Copy() const
{
PropertyVisualLayerList* p = new PropertyVisualLayerList();