Core: Revert superfluous changes made with PR #9521
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "ViewProviderSketch.h"
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
@@ -35,7 +34,7 @@
|
||||
#include "SketcherSettings.h"
|
||||
#include "SoZoomTranslation.h"
|
||||
#include "ViewProviderPython.h"
|
||||
|
||||
#include "ViewProviderSketch.h"
|
||||
#include "ViewProviderSketchGeometryExtension.h"
|
||||
#include "ViewProviderSketchGeometryExtensionPy.h"
|
||||
#include "Workbench.h"
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
#include <QString>
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
// clang-format on
|
||||
|
||||
#include <App/OriginFeature.h>
|
||||
#include <Gui/Action.h>
|
||||
#include <Gui/Application.h>
|
||||
@@ -42,6 +37,8 @@
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/SelectionFilter.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Mod/Part/App/DatumFeature.h>
|
||||
#include <Mod/Part/App/Geometry2d.h>
|
||||
#include <Mod/Sketcher/App/Constraint.h>
|
||||
|
||||
@@ -28,17 +28,14 @@
|
||||
#include <QPainter>
|
||||
#endif // #ifndef _PreComp_
|
||||
|
||||
// clang-format off
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
// clang-format on
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Mod/Sketcher/App/SketchObject.h>
|
||||
|
||||
#include "CommandConstraints.h"
|
||||
|
||||
@@ -30,17 +30,14 @@
|
||||
#include <QDialog>
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
// clang-format on
|
||||
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/Notifications.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Mod/Sketcher/App/GeometryFacade.h>
|
||||
#include <Mod/Sketcher/App/SketchObject.h>
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -61,8 +61,6 @@ public:
|
||||
|
||||
void Save(Base::Writer& writer) const override;
|
||||
void Restore(Base::XMLReader& reader) override;
|
||||
void Restore(Base::DocumentReader& reader,
|
||||
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* containerEl) override;
|
||||
|
||||
Property* Copy() const override;
|
||||
void Paste(const Property& from) override;
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
// clang-format off
|
||||
#include "ViewProviderSketch.h"
|
||||
|
||||
#include <Gui/Command.h>
|
||||
|
||||
#include "TaskDlgEditSketch.h"
|
||||
// clang-format on
|
||||
#include "ViewProviderSketch.h"
|
||||
|
||||
|
||||
using namespace SketcherGui;
|
||||
|
||||
//**************************************************************************
|
||||
|
||||
@@ -39,11 +39,6 @@
|
||||
#include <QTextStream>
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
// clang-format on
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Gui/Application.h>
|
||||
@@ -57,6 +52,8 @@
|
||||
#include <Gui/SelectionObject.h>
|
||||
#include <Gui/SoFCUnifiedSelection.h>
|
||||
#include <Gui/Utilities.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Mod/Part/App/Geometry.h>
|
||||
#include <Mod/Sketcher/App/GeoList.h>
|
||||
#include <Mod/Sketcher/App/GeometryFacade.h>
|
||||
|
||||
@@ -29,12 +29,10 @@
|
||||
#include <boost_signals2.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include <Gui/GLPainter.h>
|
||||
|
||||
#include <Base/Parameter.h>
|
||||
#include <Base/Placement.h>
|
||||
#include <Gui/Document.h>
|
||||
|
||||
#include <Gui/GLPainter.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Mod/Part/Gui/ViewProvider2DObject.h>
|
||||
#include <Mod/Part/Gui/ViewProviderAttachExtension.h>
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/DocumentReader.h>
|
||||
#include <Base/Reader.h>
|
||||
#include <Base/Writer.h>
|
||||
|
||||
@@ -88,20 +86,3 @@ void VisualLayer::Restore(Base::XMLReader& reader)
|
||||
linePattern = reader.getAttributeAsUnsigned("linePattern");
|
||||
lineWidth = reader.getAttributeAsFloat("lineWidth");
|
||||
}
|
||||
|
||||
void VisualLayer::Restore(Base::DocumentReader& reader,
|
||||
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* ContainerDOM)
|
||||
{
|
||||
const char* visible_cstr = reader.GetAttribute(ContainerDOM, "visible");
|
||||
if (visible_cstr) {
|
||||
std::string str = visible_cstr;
|
||||
visible = (str == "true");
|
||||
|
||||
const char* linePattern_cstr = reader.GetAttribute(ContainerDOM, "linePattern");
|
||||
const char* lineWidth_cstr = reader.GetAttribute(ContainerDOM, "lineWidth");
|
||||
if (linePattern_cstr && lineWidth_cstr) {
|
||||
linePattern = reader.ContentToUnsigned(linePattern_cstr);
|
||||
lineWidth = reader.ContentToUnsigned(lineWidth_cstr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,6 @@ public:
|
||||
|
||||
void Save(Base::Writer& /*writer*/) const;
|
||||
void Restore(Base::XMLReader& /*reader*/);
|
||||
void Restore(Base::DocumentReader& reader,
|
||||
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* containerEl);
|
||||
|
||||
private:
|
||||
unsigned int linePattern;
|
||||
|
||||
Reference in New Issue
Block a user