* Fem: Reset field color bar - fixes #13695 * Fem: Hide input filter if new filer is created
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
|
||||
#ifdef FC_USE_VTK
|
||||
#include <Mod/Fem/App/FemPostPipeline.h>
|
||||
#include <Mod/Fem/Gui/ViewProviderFemPostObject.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1691,6 +1692,22 @@ void setupFilter(Gui::Command* cmd, std::string Name)
|
||||
femFilter->Input.setValue(selObject);
|
||||
}
|
||||
|
||||
femFilter->Data.setValue(static_cast<Fem::FemPostObject*>(selObject)->Data.getValue());
|
||||
auto selObjectView = static_cast<FemGui::ViewProviderFemPostObject*>(
|
||||
Gui::Application::Instance->getViewProvider(selObject));
|
||||
|
||||
cmd->doCommand(Gui::Command::Doc,
|
||||
"App.activeDocument().ActiveObject.ViewObject.Field = \"%s\"",
|
||||
selObjectView->Field.getValueAsString());
|
||||
cmd->doCommand(Gui::Command::Doc,
|
||||
"App.activeDocument().ActiveObject.ViewObject.VectorMode = \"%s\"",
|
||||
selObjectView->VectorMode.getValueAsString());
|
||||
|
||||
// hide selected filter
|
||||
cmd->doCommand(Gui::Command::Doc,
|
||||
"App.activeDocument().%s.ViewObject.Visibility = False",
|
||||
selObject->getNameInDocument());
|
||||
|
||||
cmd->updateActive();
|
||||
// open the dialog to edit the filter
|
||||
cmd->doCommand(Gui::Command::Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str());
|
||||
|
||||
@@ -811,11 +811,13 @@ void ViewProviderFemPostObject::filterArtifacts(vtkDataSet* dset)
|
||||
m_surface->SetInputData(dset);
|
||||
}
|
||||
}
|
||||
|
||||
m_blockPropertyChanges = false;
|
||||
|
||||
// restore initial vsibility
|
||||
if (!visibility) {
|
||||
this->Visibility.setValue(visibility);
|
||||
}
|
||||
m_blockPropertyChanges = false;
|
||||
}
|
||||
|
||||
bool ViewProviderFemPostObject::setupPipeline()
|
||||
@@ -1041,7 +1043,7 @@ void ViewProviderFemPostObject::show()
|
||||
|
||||
void ViewProviderFemPostObject::OnChange(Base::Subject<int>& /*rCaller*/, int /*rcReason*/)
|
||||
{
|
||||
bool ResetColorBarRange = false;
|
||||
bool ResetColorBarRange = true;
|
||||
WriteColorData(ResetColorBarRange);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user