Skip to content

Commit

Permalink
Part: enable 'Toggle export' of SubShapeBinder in body
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder committed Sep 21, 2021
1 parent f5d42e2 commit d271cbf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Part/Gui/ViewProviderSubShapeBinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <Gui/Command.h>

#include <Mod/Part/App/SubShapeBinder.h>
#include <Mod/Part/App/BodyBase.h>
#include <Mod/Part/Gui/PartParams.h>
#include "ViewProviderSubShapeBinder.h"

Expand Down Expand Up @@ -304,6 +305,12 @@ void ViewProviderSubShapeBinder::setupContextMenu(QMenu* menu, QObject* receiver
});
}

auto body = Part::BodyBase::findBodyOf(self);
if (body) {
auto act = menu->addAction(QObject::tr("Toggle export"), receiver, member);
act->setData(QVariant((int)Gui::ViewProvider::ExportInGroup));
}

ViewProviderPart::setupContextMenu(menu,receiver,member);
}

Expand Down Expand Up @@ -486,6 +493,7 @@ void ViewProviderSubShapeBinder::getExtraIcons(
generateIcons();
for (auto &v : iconMap)
icons.emplace_back(v.first, v.second.pixmap);
ViewProviderPart::getExtraIcons(icons);
}

QString ViewProviderSubShapeBinder::getToolTip(const QByteArray &tag) const
Expand Down

0 comments on commit d271cbf

Please sign in to comment.