Skip to content

Commit

Permalink
Part: add viewprovider icon for the Part::Spline object
Browse files Browse the repository at this point in the history
The `Part::Spline` object is the parent of the parametric
Surface Workbench objects.

For example, the `Part::Spline` object is created by the
`Surface_CurveOnMesh` tool, which in reality just calls
the `MeshPart_CurveOnMesh` tool.
  • Loading branch information
vocx-fc authored and wwmayer committed Oct 13, 2020
1 parent c9c4bbe commit 27e42f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Mod/Part/Gui/ViewProviderSpline.cpp
Expand Up @@ -51,6 +51,7 @@
#include <App/PropertyStandard.h>
#include <Mod/Part/App/PartFeature.h>
#include <Gui/ActionFunction.h>
#include <Gui/BitmapFactory.h>
#include "SoFCShapeObject.h"
#include "ViewProviderSpline.h"

Expand All @@ -71,6 +72,11 @@ ViewProviderSpline::~ViewProviderSpline()
{
}

QIcon ViewProviderSpline::getIcon(void) const
{
return Gui::BitmapFactory().pixmap("Part_Spline_Parametric");
}

void ViewProviderSpline::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
{
ViewProviderPartExt::setupContextMenu(menu, receiver, member);
Expand Down
3 changes: 1 addition & 2 deletions src/Mod/Part/Gui/ViewProviderSpline.h
Expand Up @@ -20,8 +20,6 @@
* *
***************************************************************************/



#ifndef PARTGUI_VIEWPROVIDERPARTSPLINE_H
#define PARTGUI_VIEWPROVIDERPARTSPLINE_H

Expand All @@ -43,6 +41,7 @@ class PartGuiExport ViewProviderSpline : public ViewProviderPartExt
// Display properties
App::PropertyBool ControlPoints;

QIcon getIcon(void) const;
void updateData(const App::Property* prop);
void setupContextMenu(QMenu* menu, QObject* receiver, const char* member);

Expand Down

0 comments on commit 27e42f5

Please sign in to comment.