+ do not long apply changes in mesh settings on existing mesh objects
This commit is contained in:
parent
7149cce90f
commit
16a8965038
|
@ -24,13 +24,7 @@
|
|||
#include "PreCompiled.h"
|
||||
|
||||
#include "DlgSettingsMeshView.h"
|
||||
#include "ViewProvider.h"
|
||||
#include <Gui/PrefWidgets.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <Base/Console.h>
|
||||
|
||||
using namespace MeshGui;
|
||||
|
||||
|
@ -64,25 +58,6 @@ void DlgSettingsMeshView::saveSettings()
|
|||
spinLineTransparency->onSave();
|
||||
checkboxNormal->onSave();
|
||||
spinboxAngle->onSave();
|
||||
|
||||
bool twoside = checkboxRendering->isChecked();
|
||||
double angle = 0.0;
|
||||
if (checkboxNormal->isChecked()) {
|
||||
angle = spinboxAngle->value();
|
||||
}
|
||||
|
||||
// search for Mesh view providers and apply the new settings
|
||||
std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||
for (std::vector<App::Document*>::iterator it = docs.begin(); it != docs.end(); ++it) {
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(*it);
|
||||
std::vector<Gui::ViewProvider*> views = doc->getViewProvidersOfType(ViewProviderMesh::getClassTypeId());
|
||||
for (std::vector<Gui::ViewProvider*>::iterator jt = views.begin(); jt != views.end(); ++jt) {
|
||||
ViewProviderMesh* meshview = static_cast<ViewProviderMesh*>(*jt);
|
||||
if (twoside) meshview->Lighting.setValue(1);
|
||||
else meshview->Lighting.setValue((long)0);
|
||||
meshview->CreaseAngle.setValue(angle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DlgSettingsMeshView::loadSettings()
|
||||
|
|
Loading…
Reference in New Issue
Block a user