HatchColor & HatchScale prop to Gui side

This commit is contained in:
WandererFan
2018-02-13 19:26:21 -05:00
parent 6fa92cb188
commit cbca02f7f3
5 changed files with 53 additions and 29 deletions

View File

@@ -70,6 +70,7 @@
#include "QGIMatting.h"
#include "QGIViewPart.h"
#include "ViewProviderGeomHatch.h"
#include "ViewProviderHatch.h"
using namespace TechDrawGui;
using namespace TechDrawGeometry;
@@ -412,8 +413,12 @@ void QGIViewPart::drawViewPart()
newFace->isHatched(true);
newFace->setFillMode(QGIFace::FromFile);
newFace->setHatchFile(fHatch->HatchPattern.getValue());
newFace->setHatchScale(fHatch->HatchScale.getValue());
newFace->setHatchColor(fHatch->HatchColor.getValue());
Gui::ViewProvider* gvp = QGIView::getViewProvider(fHatch);
ViewProviderHatch* hatchVp = dynamic_cast<ViewProviderHatch*>(gvp);
if (hatchVp != nullptr) {
newFace->setHatchScale(hatchVp->HatchScale.getValue());
newFace->setHatchColor(hatchVp->HatchColor.getValue());
}
}
}
bool drawEdges = getFaceEdgesPref();