#include <PartSet_WidgetPoint2dDistance.h>
#include <PartSet_WidgetShapeSelector.h>
#include <PartSet_WidgetConstraintShapeSelector.h>
+#include <PartSet_WidgetEditor.h>
#include <PartSet_SketcherMgr.h>
#include <ModuleBase_Operation.h>
#include <Events_Loop.h>
#include <Config_PropManager.h>
+#include <Config_Keywords.h>
#include <StdSelect_TypeOfFace.hxx>
#include <TopoDS_Vertex.hxx>
bool PartSet_Module::canDisplayObject(const ObjectPtr& theObject) const
{
- // the display should be possible almost always, with exception of some specific cases
-
- bool aCanDisplay = true;
-
- if (mySketchMgr->activeSketch()) {
- aCanDisplay = mySketchMgr->canDisplayObject(theObject);
- }
- return aCanDisplay;
+ // the sketch manager put the restriction to the objects display
+ return mySketchMgr->canDisplayObject(theObject);
}
bool PartSet_Module::addViewerItems(QMenu* theMenu, const QMap<QString, QAction*>& theStdActions) const
return true;
}
+bool PartSet_Module::isMouseOverWindow()
+{
+ return mySketchMgr->isMouseOverWindow();
+}
+
void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
{
ModuleBase_IPropertyPanel* aPanel = theOperation->propertyPanel();
new PartSet_WidgetConstraintShapeSelector(theParent, workshop(), theWidgetApi, theParentId);
aConstraintShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
aWgt = aConstraintShapeSelectorWgt;
- }
+ } if (theType == WDG_DOUBLEVALUE_EDITOR) {
+ aWgt = new PartSet_WidgetEditor(theParent, workshop(), theWidgetApi, theParentId);
+ }
return aWgt;
}
// the abort leads to selection lost on constraint objects. It can be corrected after #386 issue
XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(workshop());
XGUI_Workshop* aWorkshop = aConnector->workshop();
- ModuleBase_ISelection* aSel = aConnector->selection();
+ ModuleBase_ISelection* aSel = workshop()->selection();
QObjectPtrList aSelectedObj = aSel->selectedPresentations();
// if there are no selected objects in the viewer, that means that the selection in another
// place cased this method. It is necessary to return the false value to understande in above
/// \return a boolean value
static bool isDistanceOperation(ModuleBase_Operation* theOperation);
+ bool isMouseOverWindow() { return myIsMouseOverWindow; }
+
/// Returns current Sketch feature/ Returns NULL if there is no launched sketch operation
CompositeFeaturePtr activeSketch() const { return myCurrentSketch; }
/// \param isChecked if true, the feature is a construction
void setAuxiliary(const bool isChecked);
-
+ /// Returns state of constraints showing flag
bool isConstraintsShown() const { return myIsConstraintsShown; }