issue #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box
This commit is contained in:
@@ -109,11 +109,11 @@ void TaskAttacher::makeRefStrings(std::vector<QString>& refstrings, std::vector<
|
||||
}
|
||||
|
||||
TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidget *parent,
|
||||
QString picture, QString text)
|
||||
QString picture, QString text, TaskAttacher::VisibilityFunction visFunc)
|
||||
: TaskBox(Gui::BitmapFactory().pixmap(picture.toLatin1()), text, true, parent),
|
||||
SelectionObserver(ViewProvider),
|
||||
ViewProvider(ViewProvider),
|
||||
visibilityFunc(0)
|
||||
visibilityFunc(visFunc)
|
||||
{
|
||||
//check if we are attachable
|
||||
if (!ViewProvider->getObject()->hasExtension(Part::AttachExtension::getExtensionClassTypeId()))
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidget *parent = 0,
|
||||
QString picture = QString(),
|
||||
QString text = QString::fromLatin1("Attachment"));
|
||||
QString text = QString::fromLatin1("Attachment"), VisibilityFunction func = 0);
|
||||
~TaskAttacher();
|
||||
|
||||
bool getFlip(void) const;
|
||||
@@ -69,15 +69,6 @@ public:
|
||||
*/
|
||||
Attacher::eMapMode getActiveMapMode();
|
||||
|
||||
/**
|
||||
* @brief setCustomVisibilityAutomation sets a customized function
|
||||
* in order to allow to handle visibility automation differently than
|
||||
* the default implementation.
|
||||
*/
|
||||
void setCustomVisibilityAutomation(VisibilityFunction func) {
|
||||
visibilityFunc = func;
|
||||
}
|
||||
|
||||
bool isCompleted() const { return completed; }
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -690,8 +690,7 @@ TaskPrimitiveParameters::TaskPrimitiveParameters(ViewProviderPrimitive* Primitiv
|
||||
}
|
||||
};
|
||||
|
||||
parameter = new PartGui::TaskAttacher(PrimitiveView);
|
||||
parameter->setCustomVisibilityAutomation(customvisfunc);
|
||||
parameter = new PartGui::TaskAttacher(PrimitiveView, nullptr, QString(), tr("Attachment"), customvisfunc);
|
||||
Content.push_back(parameter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user