CAM: apply precommit

This commit is contained in:
Adrian Insaurralde Avalos
2024-09-03 14:54:36 -04:00
parent f12c2e0252
commit 7274dac185
337 changed files with 26842 additions and 25585 deletions

View File

@@ -42,7 +42,7 @@ QIcon ViewProviderPathShape::getIcon() const
std::vector<App::DocumentObject*> ViewProviderPathShape::claimChildren() const
{
return std::vector<App::DocumentObject*>(
static_cast<Path::FeatureShape*>(getObject())->Sources.getValues());
static_cast<Path::FeatureShape*>(getObject())->Sources.getValues());
}
bool ViewProviderPathShape::canDragObjects() const
@@ -57,9 +57,10 @@ bool ViewProviderPathShape::canDragObject(App::DocumentObject* obj) const
void ViewProviderPathShape::dragObject(App::DocumentObject* obj)
{
Path::FeatureShape *feature = static_cast<Path::FeatureShape*>(getObject());
Path::FeatureShape* feature = static_cast<Path::FeatureShape*>(getObject());
std::vector<App::DocumentObject*> sources = feature->Sources.getValues();
for (std::vector<App::DocumentObject*>::iterator it = sources.begin(); it != sources.end(); ++it) {
for (std::vector<App::DocumentObject*>::iterator it = sources.begin(); it != sources.end();
++it) {
if (*it == obj) {
sources.erase(it);
feature->Sources.setValues(sources);
@@ -80,7 +81,7 @@ bool ViewProviderPathShape::canDropObject(App::DocumentObject* obj) const
void ViewProviderPathShape::dropObject(App::DocumentObject* obj)
{
Path::FeatureShape *feature = static_cast<Path::FeatureShape*>(getObject());
Path::FeatureShape* feature = static_cast<Path::FeatureShape*>(getObject());
std::vector<App::DocumentObject*> sources = feature->Sources.getValues();
sources.push_back(obj);
feature->Sources.setValues(sources);
@@ -90,22 +91,27 @@ void ViewProviderPathShape::updateData(const App::Property* prop)
{
PathGui::ViewProviderPath::updateData(prop);
if (prop->isDerivedFrom<App::PropertyLinkList>()) {
std::vector<App::DocumentObject*> pShapes = static_cast<const App::PropertyLinkList*>(prop)->getValues();
for (std::vector<App::DocumentObject*>::iterator it = pShapes.begin(); it != pShapes.end(); ++it) {
if (*it)
std::vector<App::DocumentObject*> pShapes =
static_cast<const App::PropertyLinkList*>(prop)->getValues();
for (std::vector<App::DocumentObject*>::iterator it = pShapes.begin(); it != pShapes.end();
++it) {
if (*it) {
Gui::Application::Instance->hideViewProvider(*it);
}
}
}
}
bool ViewProviderPathShape::onDelete(const std::vector<std::string> &)
bool ViewProviderPathShape::onDelete(const std::vector<std::string>&)
{
// get the input shapes
Path::FeatureShape *feature = static_cast<Path::FeatureShape*>(getObject());
std::vector<App::DocumentObject*> pShapes =feature->Sources.getValues();
for (std::vector<App::DocumentObject*>::iterator it = pShapes.begin(); it != pShapes.end(); ++it) {
if (*it)
Path::FeatureShape* feature = static_cast<Path::FeatureShape*>(getObject());
std::vector<App::DocumentObject*> pShapes = feature->Sources.getValues();
for (std::vector<App::DocumentObject*>::iterator it = pShapes.begin(); it != pShapes.end();
++it) {
if (*it) {
Gui::Application::Instance->showViewProvider(*it);
}
}
return true;
}