PartDesign: Prepare for clang-format (#16048)
* PartDesign: Prepare for clang-format * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QAction>
|
||||
# include <QMessageBox>
|
||||
# include <QMetaObject>
|
||||
#include <QAction>
|
||||
#include <QMessageBox>
|
||||
#include <QMetaObject>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
@@ -64,7 +64,7 @@ using namespace Gui;
|
||||
// Task Parameter
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView, bool /*newObj*/, QWidget *parent)
|
||||
TaskPipeParameters::TaskPipeParameters(ViewProviderPipe* PipeView, bool /*newObj*/, QWidget* parent)
|
||||
: TaskSketchBasedParameters(PipeView, parent, "PartDesign_AdditivePipe", tr("Pipe parameters"))
|
||||
, ui(new Ui_TaskPipeParameters)
|
||||
, stateHandler(nullptr)
|
||||
@@ -75,10 +75,14 @@ TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView, bool /*newObj
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
|
||||
// some buttons are handled in a buttongroup
|
||||
connect(ui->buttonProfileBase, &QToolButton::toggled,
|
||||
this, &TaskPipeParameters::onProfileButton);
|
||||
connect(ui->comboBoxTransition, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &TaskPipeParameters::onTransitionChanged);
|
||||
connect(ui->buttonProfileBase,
|
||||
&QToolButton::toggled,
|
||||
this,
|
||||
&TaskPipeParameters::onProfileButton);
|
||||
connect(ui->comboBoxTransition,
|
||||
qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
&TaskPipeParameters::onTransitionChanged);
|
||||
|
||||
// Create context menu
|
||||
QAction* remove = new QAction(tr("Remove"), this);
|
||||
@@ -111,7 +115,8 @@ TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView, bool /*newObj
|
||||
auto* profileVP = doc->getViewProvider(pipe->Profile.getValue());
|
||||
profileShow = profileVP->isShow();
|
||||
profileVP->setVisible(true);
|
||||
ui->profileBaseEdit->setText(make2DLabel(pipe->Profile.getValue(), pipe->Profile.getSubValues()));
|
||||
ui->profileBaseEdit->setText(
|
||||
make2DLabel(pipe->Profile.getValue(), pipe->Profile.getSubValues()));
|
||||
}
|
||||
// the auxiliary spine
|
||||
if (pipe->AuxillerySpine.getValue()) {
|
||||
@@ -121,7 +126,7 @@ TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView, bool /*newObj
|
||||
}
|
||||
// the spine edges
|
||||
std::vector<std::string> strings = pipe->Spine.getSubValues();
|
||||
for (const auto & string : strings) {
|
||||
for (const auto& string : strings) {
|
||||
QString label = QString::fromStdString(string);
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setText(label);
|
||||
@@ -143,10 +148,12 @@ TaskPipeParameters::~TaskPipeParameters()
|
||||
{
|
||||
try {
|
||||
if (auto pipe = getObject<PartDesign::Pipe>()) {
|
||||
// setting visibility to true is needed when preselecting profile and path prior to invoking sweep
|
||||
// setting visibility to true is needed when preselecting profile and path prior to
|
||||
// invoking sweep
|
||||
Gui::cmdGuiObject(pipe, "Visibility = True");
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Spine, false);
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Profile, false);
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Profile,
|
||||
false);
|
||||
}
|
||||
}
|
||||
catch (const Standard_OutOfRange&) {
|
||||
@@ -156,7 +163,7 @@ TaskPipeParameters::~TaskPipeParameters()
|
||||
e.ReportException();
|
||||
}
|
||||
catch (const Py::Exception&) {
|
||||
Base::PyException e; // extract the Python error text
|
||||
Base::PyException e; // extract the Python error text
|
||||
e.ReportException();
|
||||
}
|
||||
}
|
||||
@@ -166,20 +173,24 @@ void TaskPipeParameters::updateUI()
|
||||
|
||||
void TaskPipeParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
{
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::none)
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::none) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection) {
|
||||
if (referenceSelected(msg)) {
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refProfile) {
|
||||
if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refProfile) {
|
||||
App::Document* document = App::GetApplication().getDocument(msg.pDocName);
|
||||
App::DocumentObject* object = document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
App::DocumentObject* object =
|
||||
document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
if (object) {
|
||||
QString label = make2DLabel(object, {msg.pSubName});
|
||||
ui->profileBaseEdit->setText(label);
|
||||
}
|
||||
}
|
||||
else if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd) {
|
||||
else if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd) {
|
||||
QString sub = QString::fromStdString(msg.pSubName);
|
||||
if (!sub.isEmpty()) {
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
@@ -189,13 +200,15 @@ void TaskPipeParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
}
|
||||
|
||||
App::Document* document = App::GetApplication().getDocument(msg.pDocName);
|
||||
App::DocumentObject* object = document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
App::DocumentObject* object =
|
||||
document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
if (object) {
|
||||
QString label = QString::fromUtf8(object->Label.getValue());
|
||||
ui->spineBaseEdit->setText(label);
|
||||
}
|
||||
}
|
||||
else if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove) {
|
||||
else if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove) {
|
||||
QString sub = QString::fromLatin1(msg.pSubName);
|
||||
if (!sub.isEmpty()) {
|
||||
removeFromListWidget(ui->listWidgetReferences, sub);
|
||||
@@ -204,11 +217,13 @@ void TaskPipeParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
ui->spineBaseEdit->clear();
|
||||
}
|
||||
}
|
||||
else if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refSpine) {
|
||||
else if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refSpine) {
|
||||
ui->listWidgetReferences->clear();
|
||||
|
||||
App::Document* document = App::GetApplication().getDocument(msg.pDocName);
|
||||
App::DocumentObject* object = document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
App::DocumentObject* object =
|
||||
document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
if (object) {
|
||||
QString label = QString::fromUtf8(object->Label.getValue());
|
||||
ui->spineBaseEdit->setText(label);
|
||||
@@ -294,76 +309,84 @@ bool TaskPipeParameters::referenceSelected(const SelectionChanges& msg) const
|
||||
{
|
||||
auto selectionMode = stateHandler->getSelectionMode();
|
||||
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection &&
|
||||
selectionMode != StateHandlerTaskPipe::SelectionModes::none) {
|
||||
if (strcmp(msg.pDocName, getAppDocument()->getName()) != 0)
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection
|
||||
&& selectionMode != StateHandlerTaskPipe::SelectionModes::none) {
|
||||
if (strcmp(msg.pDocName, getAppDocument()->getName()) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// not allowed to reference ourself
|
||||
const char* fname = getObject()->getNameInDocument();
|
||||
if (strcmp(msg.pObjectName, fname) == 0)
|
||||
if (strcmp(msg.pObjectName, fname) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (selectionMode) {
|
||||
case StateHandlerTaskPipe::SelectionModes::refProfile:
|
||||
{
|
||||
auto pipe = getObject<PartDesign::Pipe>();
|
||||
Gui::Document* doc = getGuiDocument();
|
||||
case StateHandlerTaskPipe::SelectionModes::refProfile: {
|
||||
auto pipe = getObject<PartDesign::Pipe>();
|
||||
Gui::Document* doc = getGuiDocument();
|
||||
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Profile, false);
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Profile,
|
||||
false);
|
||||
|
||||
bool success = true;
|
||||
App::DocumentObject* profile = pipe->getDocument()->getObject(msg.pObjectName);
|
||||
if (profile) {
|
||||
std::vector<App::DocumentObject*> sections = pipe->Sections.getValues();
|
||||
bool success = true;
|
||||
App::DocumentObject* profile = pipe->getDocument()->getObject(msg.pObjectName);
|
||||
if (profile) {
|
||||
std::vector<App::DocumentObject*> sections = pipe->Sections.getValues();
|
||||
|
||||
// cannot use the same object for profile and section
|
||||
if (std::find(sections.begin(), sections.end(), profile) != sections.end()) {
|
||||
success = false;
|
||||
// cannot use the same object for profile and section
|
||||
if (std::find(sections.begin(), sections.end(), profile) != sections.end()) {
|
||||
success = false;
|
||||
}
|
||||
else {
|
||||
pipe->Profile.setValue(profile, {msg.pSubName});
|
||||
}
|
||||
|
||||
// hide the old or new profile again
|
||||
auto* pvp = doc->getViewProvider(pipe->Profile.getValue());
|
||||
if (pvp) {
|
||||
pvp->setVisible(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
pipe->Profile.setValue(profile, {msg.pSubName});
|
||||
return success;
|
||||
}
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpine:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove: {
|
||||
// change the references
|
||||
std::string subName(msg.pSubName);
|
||||
auto pipe = getObject<PartDesign::Pipe>();
|
||||
std::vector<std::string> refs = pipe->Spine.getSubValues();
|
||||
std::vector<std::string>::iterator f = std::find(refs.begin(), refs.end(), subName);
|
||||
|
||||
if (selectionMode == StateHandlerTaskPipe::SelectionModes::refSpine) {
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Spine,
|
||||
false);
|
||||
refs.clear();
|
||||
}
|
||||
else if (selectionMode == StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd) {
|
||||
if (f == refs.end()) {
|
||||
refs.push_back(subName);
|
||||
}
|
||||
else {
|
||||
return false; // duplicate selection
|
||||
}
|
||||
}
|
||||
else if (selectionMode
|
||||
== StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove) {
|
||||
if (f != refs.end()) {
|
||||
refs.erase(f);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// hide the old or new profile again
|
||||
auto* pvp = doc->getViewProvider(pipe->Profile.getValue());
|
||||
if (pvp)
|
||||
pvp->setVisible(false);
|
||||
pipe->Spine.setValue(getAppDocument()->getObject(msg.pObjectName), refs);
|
||||
return true;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpine:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove:
|
||||
{
|
||||
//change the references
|
||||
std::string subName(msg.pSubName);
|
||||
auto pipe = getObject<PartDesign::Pipe>();
|
||||
std::vector<std::string> refs = pipe->Spine.getSubValues();
|
||||
std::vector<std::string>::iterator f = std::find(refs.begin(), refs.end(), subName);
|
||||
|
||||
if (selectionMode == StateHandlerTaskPipe::SelectionModes::refSpine) {
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Spine, false);
|
||||
refs.clear();
|
||||
}
|
||||
else if (selectionMode == StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd) {
|
||||
if (f == refs.end())
|
||||
refs.push_back(subName);
|
||||
else
|
||||
return false; // duplicate selection
|
||||
}
|
||||
else if (selectionMode == StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove) {
|
||||
if (f != refs.end())
|
||||
refs.erase(f);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
pipe->Spine.setValue(getAppDocument()->getObject(msg.pObjectName), refs);
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,16 +438,16 @@ void TaskPipeParameters::setVisibilityOfSpineAndProfile()
|
||||
|
||||
bool TaskPipeParameters::accept()
|
||||
{
|
||||
//see what to do with external references
|
||||
//check the prerequisites for the selected objects
|
||||
//the user has to decide which option we should take if external references are used
|
||||
// see what to do with external references
|
||||
// check the prerequisites for the selected objects
|
||||
// the user has to decide which option we should take if external references are used
|
||||
auto pipe = getObject<PartDesign::Pipe>();
|
||||
auto pcActiveBody = PartDesignGui::getBodyFor (pipe, false);
|
||||
auto pcActiveBody = PartDesignGui::getBodyFor(pipe, false);
|
||||
if (!pcActiveBody) {
|
||||
QMessageBox::warning(this, tr("Input error"), tr("No active body"));
|
||||
return false;
|
||||
}
|
||||
//auto pcActivePart = PartDesignGui::getPartFor (pcActiveBody, false);
|
||||
// auto pcActivePart = PartDesignGui::getPartFor (pcActiveBody, false);
|
||||
std::vector<App::DocumentObject*> copies;
|
||||
|
||||
bool extReference = false;
|
||||
@@ -435,7 +458,10 @@ bool TaskPipeParameters::accept()
|
||||
QString label = ui->spineBaseEdit->text();
|
||||
if (!spine && !label.isEmpty()) {
|
||||
QByteArray ba = label.toUtf8();
|
||||
std::vector<App::DocumentObject*> objs = pipe->getDocument()->findObjects(App::DocumentObject::getClassTypeId(), nullptr, ba.constData());
|
||||
std::vector<App::DocumentObject*> objs =
|
||||
pipe->getDocument()->findObjects(App::DocumentObject::getClassTypeId(),
|
||||
nullptr,
|
||||
ba.constData());
|
||||
if (!objs.empty()) {
|
||||
pipe->Spine.setValue(objs.front());
|
||||
spine = objs.front();
|
||||
@@ -445,7 +471,8 @@ bool TaskPipeParameters::accept()
|
||||
if (spine && !pcActiveBody->hasObject(spine) && !pcActiveBody->getOrigin()->hasObject(spine)) {
|
||||
extReference = true;
|
||||
}
|
||||
else if (auxSpine && !pcActiveBody->hasObject(auxSpine) && !pcActiveBody->getOrigin()->hasObject(auxSpine)) {
|
||||
else if (auxSpine && !pcActiveBody->hasObject(auxSpine)
|
||||
&& !pcActiveBody->getOrigin()->hasObject(auxSpine)) {
|
||||
extReference = true;
|
||||
}
|
||||
else {
|
||||
@@ -463,31 +490,38 @@ bool TaskPipeParameters::accept()
|
||||
dlg.setupUi(&dia);
|
||||
dia.setModal(true);
|
||||
int result = dia.exec();
|
||||
if (result == QDialog::DialogCode::Rejected)
|
||||
if (result == QDialog::DialogCode::Rejected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dlg.radioXRef->isChecked()) {
|
||||
if (!pcActiveBody->hasObject(spine) && !pcActiveBody->getOrigin()->hasObject(spine)) {
|
||||
pipe->Spine.setValue(PartDesignGui::TaskFeaturePick::makeCopy(spine, "",
|
||||
dlg.radioIndependent->isChecked()),
|
||||
pipe->Spine.getSubValues());
|
||||
pipe->Spine.setValue(
|
||||
PartDesignGui::TaskFeaturePick::makeCopy(spine,
|
||||
"",
|
||||
dlg.radioIndependent->isChecked()),
|
||||
pipe->Spine.getSubValues());
|
||||
copies.push_back(pipe->Spine.getValue());
|
||||
}
|
||||
else if (!pcActiveBody->hasObject(auxSpine) && !pcActiveBody->getOrigin()->hasObject(auxSpine)){
|
||||
pipe->AuxillerySpine.setValue(PartDesignGui::TaskFeaturePick::makeCopy(auxSpine, "",
|
||||
dlg.radioIndependent->isChecked()),
|
||||
pipe->AuxillerySpine.getSubValues());
|
||||
else if (!pcActiveBody->hasObject(auxSpine)
|
||||
&& !pcActiveBody->getOrigin()->hasObject(auxSpine)) {
|
||||
pipe->AuxillerySpine.setValue(
|
||||
PartDesignGui::TaskFeaturePick::makeCopy(auxSpine,
|
||||
"",
|
||||
dlg.radioIndependent->isChecked()),
|
||||
pipe->AuxillerySpine.getSubValues());
|
||||
copies.push_back(pipe->AuxillerySpine.getValue());
|
||||
}
|
||||
|
||||
std::vector<App::PropertyLinkSubList::SubSet> subSets;
|
||||
for (auto &subSet : pipe->Sections.getSubListValues()) {
|
||||
if (!pcActiveBody->hasObject(subSet.first) &&
|
||||
!pcActiveBody->getOrigin()->hasObject(subSet.first)) {
|
||||
for (auto& subSet : pipe->Sections.getSubListValues()) {
|
||||
if (!pcActiveBody->hasObject(subSet.first)
|
||||
&& !pcActiveBody->getOrigin()->hasObject(subSet.first)) {
|
||||
subSets.emplace_back(
|
||||
PartDesignGui::TaskFeaturePick::makeCopy(
|
||||
subSet.first, "", dlg.radioIndependent->isChecked()),
|
||||
subSet.second);
|
||||
PartDesignGui::TaskFeaturePick::makeCopy(subSet.first,
|
||||
"",
|
||||
dlg.radioIndependent->isChecked()),
|
||||
subSet.second);
|
||||
copies.push_back(subSets.back().first);
|
||||
}
|
||||
else {
|
||||
@@ -508,18 +542,22 @@ bool TaskPipeParameters::accept()
|
||||
Gui::cmdAppObjectArgs(pipe, "Spine = %s", propT.getPropertyPython());
|
||||
|
||||
Gui::cmdAppDocument(pipe, "recompute()");
|
||||
if (!getObject()->isValid())
|
||||
if (!getObject()->isValid()) {
|
||||
throw Base::RuntimeError(getObject()->getStatusString());
|
||||
}
|
||||
Gui::cmdGuiDocument(pipe, "resetEdit()");
|
||||
Gui::Command::commitCommand();
|
||||
|
||||
//we need to add the copied features to the body after the command action, as otherwise FreeCAD crashes unexplainably
|
||||
// we need to add the copied features to the body after the command action, as otherwise
|
||||
// FreeCAD crashes unexplainably
|
||||
for (auto obj : copies) {
|
||||
pcActiveBody->addObject(obj);
|
||||
}
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
QMessageBox::warning(this, tr("Input error"), QApplication::translate("Exception", e.what()));
|
||||
QMessageBox::warning(this,
|
||||
tr("Input error"),
|
||||
QApplication::translate("Exception", e.what()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -532,8 +570,13 @@ bool TaskPipeParameters::accept()
|
||||
// Task Orientation
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newObj*/, QWidget* parent)
|
||||
: TaskSketchBasedParameters(PipeView, parent, "PartDesign_AdditivePipe", tr("Section orientation"))
|
||||
TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView,
|
||||
bool /*newObj*/,
|
||||
QWidget* parent)
|
||||
: TaskSketchBasedParameters(PipeView,
|
||||
parent,
|
||||
"PartDesign_AdditivePipe",
|
||||
tr("Section orientation"))
|
||||
, ui(new Ui_TaskPipeOrientation)
|
||||
, stateHandler(nullptr)
|
||||
{
|
||||
@@ -542,6 +585,7 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newO
|
||||
ui->setupUi(proxy);
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
|
||||
// clang-format off
|
||||
// some buttons are handled in a buttongroup
|
||||
connect(ui->comboBoxMode, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &TaskPipeOrientation::onOrientationChanged);
|
||||
@@ -557,6 +601,7 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newO
|
||||
this, &TaskPipeOrientation::onBinormalChanged);
|
||||
connect(ui->doubleSpinBoxZ, qOverload<double>(&QDoubleSpinBox::valueChanged),
|
||||
this, &TaskPipeOrientation::onBinormalChanged);
|
||||
// clang-format on
|
||||
|
||||
// Create context menu
|
||||
QAction* remove = new QAction(tr("Remove"), this);
|
||||
@@ -574,12 +619,14 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newO
|
||||
|
||||
PartDesign::Pipe* pipe = static_cast<PartDesign::Pipe*>(PipeView->getObject());
|
||||
|
||||
//add initial values
|
||||
if (pipe->AuxillerySpine.getValue())
|
||||
ui->profileBaseEdit->setText(QString::fromUtf8(pipe->AuxillerySpine.getValue()->Label.getValue()));
|
||||
// add initial values
|
||||
if (pipe->AuxillerySpine.getValue()) {
|
||||
ui->profileBaseEdit->setText(
|
||||
QString::fromUtf8(pipe->AuxillerySpine.getValue()->Label.getValue()));
|
||||
}
|
||||
|
||||
std::vector<std::string> strings = pipe->AuxillerySpine.getSubValues();
|
||||
for (const auto & string : strings) {
|
||||
for (const auto& string : strings) {
|
||||
QString label = QString::fromStdString(string);
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setText(label);
|
||||
@@ -591,8 +638,10 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newO
|
||||
ui->curvelinear->setChecked(pipe->AuxilleryCurvelinear.getValue());
|
||||
|
||||
// should be called after panel has become visible
|
||||
QMetaObject::invokeMethod(this, "updateUI", Qt::QueuedConnection,
|
||||
Q_ARG(int,pipe->Mode.getValue()));
|
||||
QMetaObject::invokeMethod(this,
|
||||
"updateUI",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(int, pipe->Mode.getValue()));
|
||||
this->blockSelection(false);
|
||||
}
|
||||
|
||||
@@ -659,12 +708,14 @@ void TaskPipeOrientation::onBinormalChanged(double)
|
||||
|
||||
void TaskPipeOrientation::onSelectionChanged(const SelectionChanges& msg)
|
||||
{
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::none)
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::none) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection) {
|
||||
if (referenceSelected(msg)) {
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd) {
|
||||
if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd) {
|
||||
QString sub = QString::fromStdString(msg.pSubName);
|
||||
if (!sub.isEmpty()) {
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
@@ -674,13 +725,15 @@ void TaskPipeOrientation::onSelectionChanged(const SelectionChanges& msg)
|
||||
}
|
||||
|
||||
App::Document* document = App::GetApplication().getDocument(msg.pDocName);
|
||||
App::DocumentObject* object = document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
App::DocumentObject* object =
|
||||
document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
if (object) {
|
||||
QString label = QString::fromUtf8(object->Label.getValue());
|
||||
ui->profileBaseEdit->setText(label);
|
||||
}
|
||||
}
|
||||
else if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeRemove) {
|
||||
else if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeRemove) {
|
||||
QString sub = QString::fromLatin1(msg.pSubName);
|
||||
if (!sub.isEmpty()) {
|
||||
removeFromListWidget(ui->listWidgetReferences, sub);
|
||||
@@ -689,11 +742,13 @@ void TaskPipeOrientation::onSelectionChanged(const SelectionChanges& msg)
|
||||
ui->profileBaseEdit->clear();
|
||||
}
|
||||
}
|
||||
else if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refAuxSpine) {
|
||||
else if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refAuxSpine) {
|
||||
ui->listWidgetReferences->clear();
|
||||
|
||||
App::Document* document = App::GetApplication().getDocument(msg.pDocName);
|
||||
App::DocumentObject* object = document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
App::DocumentObject* object =
|
||||
document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
if (object) {
|
||||
QString label = QString::fromUtf8(object->Label.getValue());
|
||||
ui->profileBaseEdit->setText(label);
|
||||
@@ -715,20 +770,22 @@ bool TaskPipeOrientation::referenceSelected(const SelectionChanges& msg) const
|
||||
{
|
||||
auto selectionMode = stateHandler->getSelectionMode();
|
||||
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection &&
|
||||
(selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpine ||
|
||||
selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd ||
|
||||
selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeRemove)) {
|
||||
if (strcmp(msg.pDocName, getObject()->getDocument()->getName()) != 0)
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection
|
||||
&& (selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpine
|
||||
|| selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd
|
||||
|| selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeRemove)) {
|
||||
if (strcmp(msg.pDocName, getObject()->getDocument()->getName()) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// not allowed to reference ourself
|
||||
const char* fname = getObject()->getNameInDocument();
|
||||
if (strcmp(msg.pObjectName, fname) == 0)
|
||||
if (strcmp(msg.pObjectName, fname) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (auto pipe = getObject<PartDesign::Pipe>()) {
|
||||
//change the references
|
||||
// change the references
|
||||
std::string subName(msg.pSubName);
|
||||
std::vector<std::string> refs = pipe->AuxillerySpine.getSubValues();
|
||||
std::vector<std::string>::iterator f = std::find(refs.begin(), refs.end(), subName);
|
||||
@@ -738,7 +795,7 @@ bool TaskPipeOrientation::referenceSelected(const SelectionChanges& msg) const
|
||||
}
|
||||
else if (selectionMode == StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd) {
|
||||
if (f != refs.end()) {
|
||||
return false; // duplicate selection
|
||||
return false; // duplicate selection
|
||||
}
|
||||
|
||||
refs.push_back(subName);
|
||||
@@ -799,12 +856,15 @@ void TaskPipeOrientation::onDeleteItem()
|
||||
|
||||
void TaskPipeOrientation::updateUI(int idx)
|
||||
{
|
||||
//make sure we resize to the size of the current page
|
||||
for (int i=0; i<ui->stackedWidget->count(); ++i)
|
||||
// make sure we resize to the size of the current page
|
||||
for (int i = 0; i < ui->stackedWidget->count(); ++i) {
|
||||
ui->stackedWidget->widget(i)->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
|
||||
}
|
||||
|
||||
if (idx < ui->stackedWidget->count())
|
||||
ui->stackedWidget->widget(idx)->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
if (idx < ui->stackedWidget->count()) {
|
||||
ui->stackedWidget->widget(idx)->setSizePolicy(QSizePolicy::Expanding,
|
||||
QSizePolicy::Expanding);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -813,7 +873,10 @@ void TaskPipeOrientation::updateUI(int idx)
|
||||
// Task Scaling
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool /*newObj*/, QWidget* parent)
|
||||
: TaskSketchBasedParameters(PipeView, parent, "PartDesign_AdditivePipe", tr("Section transformation"))
|
||||
: TaskSketchBasedParameters(PipeView,
|
||||
parent,
|
||||
"PartDesign_AdditivePipe",
|
||||
tr("Section transformation"))
|
||||
, ui(new Ui_TaskPipeScaling)
|
||||
, stateHandler(nullptr)
|
||||
{
|
||||
@@ -823,10 +886,11 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool /*newObj*/, QW
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
|
||||
// some buttons are handled in a buttongroup
|
||||
connect(ui->comboBoxScaling, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &TaskPipeScaling::onScalingChanged);
|
||||
connect(ui->stackedWidget, &QStackedWidget::currentChanged,
|
||||
this, &TaskPipeScaling::updateUI);
|
||||
connect(ui->comboBoxScaling,
|
||||
qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
&TaskPipeScaling::onScalingChanged);
|
||||
connect(ui->stackedWidget, &QStackedWidget::currentChanged, this, &TaskPipeScaling::updateUI);
|
||||
|
||||
// Create context menu
|
||||
QAction* remove = new QAction(tr("Remove"), this);
|
||||
@@ -840,13 +904,15 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool /*newObj*/, QW
|
||||
ui->listWidgetReferences->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
connect(remove, &QAction::triggered, this, &TaskPipeScaling::onDeleteSection);
|
||||
|
||||
connect(ui->listWidgetReferences->model(), &QAbstractListModel::rowsMoved,
|
||||
this, &TaskPipeScaling::indexesMoved);
|
||||
connect(ui->listWidgetReferences->model(),
|
||||
&QAbstractListModel::rowsMoved,
|
||||
this,
|
||||
&TaskPipeScaling::indexesMoved);
|
||||
|
||||
this->groupLayout()->addWidget(proxy);
|
||||
|
||||
PartDesign::Pipe* pipe = static_cast<PartDesign::Pipe*>(PipeView->getObject());
|
||||
for (auto &subSet : pipe->Sections.getSubListValues()) {
|
||||
for (auto& subSet : pipe->Sections.getSubListValues()) {
|
||||
Gui::Application::Instance->showViewProvider(subSet.first);
|
||||
QString label = make2DLabel(subSet.first, subSet.second);
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
@@ -858,8 +924,10 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool /*newObj*/, QW
|
||||
ui->comboBoxScaling->setCurrentIndex(pipe->Transformation.getValue());
|
||||
|
||||
// should be called after panel has become visible
|
||||
QMetaObject::invokeMethod(this, "updateUI", Qt::QueuedConnection,
|
||||
Q_ARG(int,pipe->Transformation.getValue()));
|
||||
QMetaObject::invokeMethod(this,
|
||||
"updateUI",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(int, pipe->Transformation.getValue()));
|
||||
this->blockSelection(false);
|
||||
}
|
||||
|
||||
@@ -916,8 +984,9 @@ void TaskPipeScaling::onScalingChanged(int idx)
|
||||
|
||||
void TaskPipeScaling::onSelectionChanged(const SelectionChanges& msg)
|
||||
{
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::none)
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::none) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.Type == Gui::SelectionChanges::AddSelection) {
|
||||
if (referenceSelected(msg)) {
|
||||
@@ -925,14 +994,18 @@ void TaskPipeScaling::onSelectionChanged(const SelectionChanges& msg)
|
||||
App::DocumentObject* object = document ? document->getObject(msg.pObjectName) : nullptr;
|
||||
if (object) {
|
||||
QString label = make2DLabel(object, {msg.pSubName});
|
||||
if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refSectionAdd) {
|
||||
if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refSectionAdd) {
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setText(label);
|
||||
item->setData(Qt::UserRole,
|
||||
QVariant::fromValue(std::make_pair(object, std::vector<std::string>(1, msg.pSubName))));
|
||||
item->setData(
|
||||
Qt::UserRole,
|
||||
QVariant::fromValue(
|
||||
std::make_pair(object, std::vector<std::string>(1, msg.pSubName))));
|
||||
ui->listWidgetReferences->addItem(item);
|
||||
}
|
||||
else if (stateHandler->getSelectionMode() == StateHandlerTaskPipe::SelectionModes::refSectionRemove) {
|
||||
else if (stateHandler->getSelectionMode()
|
||||
== StateHandlerTaskPipe::SelectionModes::refSectionRemove) {
|
||||
removeFromListWidget(ui->listWidgetReferences, label);
|
||||
}
|
||||
}
|
||||
@@ -949,26 +1022,29 @@ bool TaskPipeScaling::referenceSelected(const SelectionChanges& msg) const
|
||||
{
|
||||
auto selectionMode = stateHandler->getSelectionMode();
|
||||
|
||||
if ((msg.Type == Gui::SelectionChanges::AddSelection) &&
|
||||
((selectionMode == StateHandlerTaskPipe::SelectionModes::refSectionAdd) ||
|
||||
(selectionMode == StateHandlerTaskPipe::SelectionModes::refSectionRemove))) {
|
||||
if (strcmp(msg.pDocName, getObject()->getDocument()->getName()) != 0)
|
||||
if ((msg.Type == Gui::SelectionChanges::AddSelection)
|
||||
&& ((selectionMode == StateHandlerTaskPipe::SelectionModes::refSectionAdd)
|
||||
|| (selectionMode == StateHandlerTaskPipe::SelectionModes::refSectionRemove))) {
|
||||
if (strcmp(msg.pDocName, getObject()->getDocument()->getName()) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// not allowed to reference ourself
|
||||
const char* fname = getObject()->getNameInDocument();
|
||||
if (strcmp(msg.pObjectName, fname) == 0)
|
||||
if (strcmp(msg.pObjectName, fname) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//change the references
|
||||
// change the references
|
||||
if (auto pipe = getObject<PartDesign::Pipe>()) {
|
||||
std::vector<App::DocumentObject*> refs = pipe->Sections.getValues();
|
||||
App::DocumentObject* obj = pipe->getDocument()->getObject(msg.pObjectName);
|
||||
std::vector<App::DocumentObject*>::iterator f = std::find(refs.begin(), refs.end(), obj);
|
||||
std::vector<App::DocumentObject*>::iterator f =
|
||||
std::find(refs.begin(), refs.end(), obj);
|
||||
|
||||
if (selectionMode == StateHandlerTaskPipe::SelectionModes::refSectionAdd) {
|
||||
if (f != refs.end()) {
|
||||
return false; // duplicate selection
|
||||
return false; // duplicate selection
|
||||
}
|
||||
|
||||
pipe->Sections.addValue(obj, {msg.pSubName});
|
||||
@@ -1007,13 +1083,16 @@ void TaskPipeScaling::onDeleteSection()
|
||||
int row = ui->listWidgetReferences->currentRow();
|
||||
QListWidgetItem* item = ui->listWidgetReferences->takeItem(row);
|
||||
if (item) {
|
||||
QByteArray data(item->data(Qt::UserRole).value<App::PropertyLinkSubList::SubSet>().first->getNameInDocument());
|
||||
QByteArray data(item->data(Qt::UserRole)
|
||||
.value<App::PropertyLinkSubList::SubSet>()
|
||||
.first->getNameInDocument());
|
||||
delete item;
|
||||
|
||||
if (auto pipe = getObject<PartDesign::Pipe>()) {
|
||||
std::vector<App::DocumentObject*> refs = pipe->Sections.getValues();
|
||||
App::DocumentObject* obj = pipe->getDocument()->getObject(data.constData());
|
||||
std::vector<App::DocumentObject*>::iterator f = std::find(refs.begin(), refs.end(), obj);
|
||||
std::vector<App::DocumentObject*>::iterator f =
|
||||
std::find(refs.begin(), refs.end(), obj);
|
||||
|
||||
if (f != refs.end()) {
|
||||
pipe->Sections.removeValue(obj);
|
||||
@@ -1026,12 +1105,15 @@ void TaskPipeScaling::onDeleteSection()
|
||||
|
||||
void TaskPipeScaling::updateUI(int idx)
|
||||
{
|
||||
//make sure we resize to the size of the current page
|
||||
for (int i=0; i<ui->stackedWidget->count(); ++i)
|
||||
// make sure we resize to the size of the current page
|
||||
for (int i = 0; i < ui->stackedWidget->count(); ++i) {
|
||||
ui->stackedWidget->widget(i)->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
|
||||
}
|
||||
|
||||
if (idx < ui->stackedWidget->count())
|
||||
ui->stackedWidget->widget(idx)->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
if (idx < ui->stackedWidget->count()) {
|
||||
ui->stackedWidget->widget(idx)->setSizePolicy(QSizePolicy::Expanding,
|
||||
QSizePolicy::Expanding);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1040,13 +1122,13 @@ void TaskPipeScaling::updateUI(int idx)
|
||||
// TaskDialog
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
TaskDlgPipeParameters::TaskDlgPipeParameters(ViewProviderPipe *PipeView,bool newObj)
|
||||
: TaskDlgSketchBasedParameters(PipeView)
|
||||
TaskDlgPipeParameters::TaskDlgPipeParameters(ViewProviderPipe* PipeView, bool newObj)
|
||||
: TaskDlgSketchBasedParameters(PipeView)
|
||||
{
|
||||
assert(PipeView);
|
||||
parameter = new TaskPipeParameters(PipeView,newObj);
|
||||
orientation = new TaskPipeOrientation(PipeView,newObj);
|
||||
scaling = new TaskPipeScaling(PipeView,newObj);
|
||||
parameter = new TaskPipeParameters(PipeView, newObj);
|
||||
orientation = new TaskPipeOrientation(PipeView, newObj);
|
||||
scaling = new TaskPipeScaling(PipeView, newObj);
|
||||
|
||||
stateHandler = new StateHandlerTaskPipe();
|
||||
|
||||
@@ -1061,29 +1143,24 @@ TaskDlgPipeParameters::TaskDlgPipeParameters(ViewProviderPipe *PipeView,bool new
|
||||
buttonGroup = new ButtonGroup(this);
|
||||
buttonGroup->setExclusive(true);
|
||||
|
||||
buttonGroup->addButton(parameter->ui->buttonProfileBase,
|
||||
StateHandlerTaskPipe::refProfile);
|
||||
buttonGroup->addButton(parameter->ui->buttonSpineBase,
|
||||
StateHandlerTaskPipe::refSpine);
|
||||
buttonGroup->addButton(parameter->ui->buttonRefAdd,
|
||||
StateHandlerTaskPipe::refSpineEdgeAdd);
|
||||
buttonGroup->addButton(parameter->ui->buttonProfileBase, StateHandlerTaskPipe::refProfile);
|
||||
buttonGroup->addButton(parameter->ui->buttonSpineBase, StateHandlerTaskPipe::refSpine);
|
||||
buttonGroup->addButton(parameter->ui->buttonRefAdd, StateHandlerTaskPipe::refSpineEdgeAdd);
|
||||
buttonGroup->addButton(parameter->ui->buttonRefRemove,
|
||||
StateHandlerTaskPipe::refSpineEdgeRemove);
|
||||
|
||||
buttonGroup->addButton(orientation->ui->buttonProfileBase,
|
||||
StateHandlerTaskPipe::refAuxSpine);
|
||||
buttonGroup->addButton(orientation->ui->buttonRefAdd,
|
||||
StateHandlerTaskPipe::refAuxSpineEdgeAdd);
|
||||
buttonGroup->addButton(orientation->ui->buttonProfileBase, StateHandlerTaskPipe::refAuxSpine);
|
||||
buttonGroup->addButton(orientation->ui->buttonRefAdd, StateHandlerTaskPipe::refAuxSpineEdgeAdd);
|
||||
buttonGroup->addButton(orientation->ui->buttonRefRemove,
|
||||
StateHandlerTaskPipe::refAuxSpineEdgeRemove);
|
||||
|
||||
buttonGroup->addButton(scaling->ui->buttonRefAdd,
|
||||
StateHandlerTaskPipe::refSectionAdd);
|
||||
buttonGroup->addButton(scaling->ui->buttonRefRemove,
|
||||
StateHandlerTaskPipe::refSectionRemove);
|
||||
buttonGroup->addButton(scaling->ui->buttonRefAdd, StateHandlerTaskPipe::refSectionAdd);
|
||||
buttonGroup->addButton(scaling->ui->buttonRefRemove, StateHandlerTaskPipe::refSectionRemove);
|
||||
|
||||
connect(buttonGroup, qOverload<QAbstractButton *, bool>(&QButtonGroup::buttonToggled),
|
||||
this, &TaskDlgPipeParameters::onButtonToggled);
|
||||
connect(buttonGroup,
|
||||
qOverload<QAbstractButton*, bool>(&QButtonGroup::buttonToggled),
|
||||
this,
|
||||
&TaskDlgPipeParameters::onButtonToggled);
|
||||
}
|
||||
|
||||
TaskDlgPipeParameters::~TaskDlgPipeParameters()
|
||||
@@ -1091,41 +1168,46 @@ TaskDlgPipeParameters::~TaskDlgPipeParameters()
|
||||
delete stateHandler;
|
||||
}
|
||||
|
||||
void TaskDlgPipeParameters::onButtonToggled(QAbstractButton *button, bool checked)
|
||||
void TaskDlgPipeParameters::onButtonToggled(QAbstractButton* button, bool checked)
|
||||
{
|
||||
int id = buttonGroup->id(button);
|
||||
|
||||
if (checked) {
|
||||
//hideObject();
|
||||
// hideObject();
|
||||
Gui::Selection().clearSelection();
|
||||
stateHandler->selectionMode = static_cast<StateHandlerTaskPipe::SelectionModes>(id);
|
||||
}
|
||||
else {
|
||||
Gui::Selection().clearSelection();
|
||||
if (stateHandler->selectionMode == static_cast<StateHandlerTaskPipe::SelectionModes>(id))
|
||||
if (stateHandler->selectionMode == static_cast<StateHandlerTaskPipe::SelectionModes>(id)) {
|
||||
stateHandler->selectionMode = StateHandlerTaskPipe::SelectionModes::none;
|
||||
}
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case StateHandlerTaskPipe::SelectionModes::refProfile:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Profile, checked);
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpine:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Spine, checked);
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refAuxSpine:
|
||||
case StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeRemove:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::AuxiliarySpine, checked);
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refSectionAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSectionRemove:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Section, checked);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refProfile:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Profile,
|
||||
checked);
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpine:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSpineEdgeRemove:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Spine,
|
||||
checked);
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refAuxSpine:
|
||||
case StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refAuxSpineEdgeRemove:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::AuxiliarySpine,
|
||||
checked);
|
||||
break;
|
||||
case StateHandlerTaskPipe::SelectionModes::refSectionAdd:
|
||||
case StateHandlerTaskPipe::SelectionModes::refSectionRemove:
|
||||
getViewObject<ViewProviderPipe>()->highlightReferences(ViewProviderPipe::Section,
|
||||
checked);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user