Sketcher: VP show overlay icon fully constrained status
======================================================= ViewProviderSketch relies on new property SketchObject::FullyConstraint to show status via overlay icon
This commit is contained in:
committed by
abdullahtahiriyo
parent
87c9f83bd6
commit
83d039101c
@@ -289,7 +289,7 @@ const Part::Geometry* GeoById(const std::vector<Part::Geometry*> GeoList, int Id
|
||||
|
||||
/* TRANSLATOR SketcherGui::ViewProviderSketch */
|
||||
|
||||
PROPERTY_SOURCE(SketcherGui::ViewProviderSketch, PartGui::ViewProvider2DObjectGrid)
|
||||
PROPERTY_SOURCE_WITH_EXTENSIONS(SketcherGui::ViewProviderSketch, PartGui::ViewProvider2DObjectGrid)
|
||||
|
||||
|
||||
ViewProviderSketch::ViewProviderSketch()
|
||||
@@ -7006,3 +7006,33 @@ void ViewProviderSketch::showRestoreInformationLayer() {
|
||||
visibleInformationChanged = true ;
|
||||
draw(false,false);
|
||||
}
|
||||
|
||||
QIcon ViewProviderSketch::mergeColorfulOverlayIcons (const QIcon & orig) const
|
||||
{
|
||||
QIcon mergedicon = orig;
|
||||
|
||||
if(!getSketchObject()->FullyConstrained.getValue()) {
|
||||
QPixmap px;
|
||||
|
||||
static const char * const sketcher_notfullyconstrained_xpm[]={
|
||||
"9 9 3 1",
|
||||
". c None",
|
||||
"# c #ff4500",
|
||||
"a c #ffffff",
|
||||
"##.....##",
|
||||
"#a#...#a#",
|
||||
"#aa#.#aa#",
|
||||
".#a#.#a#.",
|
||||
".#a#.#a#.",
|
||||
".#a#.#a#.",
|
||||
"#aa#.#aa#",
|
||||
"#a#...#a#",
|
||||
"##.....##"};
|
||||
px = QPixmap( sketcher_notfullyconstrained_xpm );
|
||||
|
||||
mergedicon = Gui::BitmapFactoryInst::mergePixmap(mergedicon, px, Gui::BitmapFactoryInst::BottomRight);
|
||||
|
||||
}
|
||||
|
||||
return Gui::ViewProvider::mergeColorfulOverlayIcons (mergedicon);
|
||||
}
|
||||
|
||||
@@ -254,6 +254,9 @@ public:
|
||||
void setIsShownVirtualSpace(bool isshownvirtualspace);
|
||||
bool getIsShownVirtualSpace(void) const;
|
||||
|
||||
/// Icons and Icon overlays
|
||||
virtual QIcon mergeColorfulOverlayIcons (const QIcon & orig) const override;
|
||||
|
||||
friend class DrawSketchHandler;
|
||||
friend struct ::EditData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user