-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// OCCT Includes
#include <Geom_Plane.hxx>
#include <AIS_LengthDimension.hxx>
-#include <AIS_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
//=================================================================================
void MeasureGUI_DistanceDlg::SolutionSelected (int i)
{
- if (i < 0 || myDbls->length() < (i+1)*6) {
+ if (i < 0 || (int)myDbls->length() < (i+1)*6) {
myGrp->LineEdit3->setText("");
myGrp->LineEdit4->setText("");
myGrp->LineEdit5->setText("");
int currSol = myGrp->ComboBox1->currentIndex();
if (!myObj1 || !myObj2 ||
- currSol == -1 || (currSol+1)*6 > myDbls->length() ||
+ currSol == -1 || (currSol+1)*6 > (int)myDbls->length() ||
vw->getViewManager()->getType() != OCCViewer_Viewer::Type())
return 0;
void MeasureGUI_DistanceDlg::activateSelection()
{
globalSelection( GEOM_ALLSHAPES );
- std::list<int> needTypes;
- needTypes.push_back( TopAbs_SHAPE ), needTypes.push_back( TopAbs_VERTEX ), needTypes.push_back( TopAbs_EDGE );
- needTypes.push_back( TopAbs_WIRE ), needTypes.push_back( TopAbs_FACE ), needTypes.push_back( TopAbs_SHELL );
- needTypes.push_back( TopAbs_SOLID ), needTypes.push_back( TopAbs_COMPSOLID ), needTypes.push_back( TopAbs_COMPOUND );
- localSelection(GEOM::GEOM_Object::_nil(), needTypes );
+ localSelection( TopAbs_SHAPE );
}
//=================================================================================
erasePreview(false);
try {
- SUIT_OverrideCursor();
+ SUIT_OverrideCursor wc;
getDisplayer()->SetColor(Quantity_NOC_VIOLET);
getDisplayer()->SetToActivate(false);
GEOMBase::PublishSubObject( myObj2.get() );
}
+//=================================================================================
+// function : getSourceObjects
+// purpose : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> MeasureGUI_DistanceDlg::getSourceObjects()
+{
+ QList<GEOM::GeomObjPtr> res;
+ res << myObj1 << myObj2;
+ return res;
+}
+
//=================================================================================
// function : MeasureGUI_DistanceGroup
// purpose :