mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-12 17:50:35 +05:00
Regression of Offset dialog: result shape not published
+ fix some warnings and memory leaks
This commit is contained in:
parent
14bd7e1d70
commit
b9104d97c5
@ -109,7 +109,7 @@ AdvancedGUI_SmoothingSurfaceDlg::~AdvancedGUI_SmoothingSurfaceDlg()
|
||||
void AdvancedGUI_SmoothingSurfaceDlg::Init()
|
||||
{
|
||||
// Get setting of step value from file configuration
|
||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||
//SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||
|
||||
initSpinBox(myDMaxSpin, 0., COORD_MAX, 0.00001, "parametric_precision" );
|
||||
|
||||
|
@ -297,8 +297,8 @@ bool EntityGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWi
|
||||
bool EntityGUI::OnMouseRelease( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWindow* theViewWindow )
|
||||
{
|
||||
((OCCViewer_ViewWindow*)theViewWindow)->setSketcherStyle(false);
|
||||
QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox();
|
||||
#ifdef WITH_OPENCV
|
||||
QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox();
|
||||
if ( aDlg && ( QString( aDlg->metaObject()->className() ).compare( "EntityGUI_FeatureDetectorDlg" ) == 0 ) &&
|
||||
theViewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() &&
|
||||
pe->modifiers() != Qt::ControlModifier )
|
||||
|
@ -148,7 +148,7 @@ void GEOMBase_Helper::display( GEOM::GEOM_Object_ptr object, const bool updateVi
|
||||
// getDisplayer()->UnsetColor();
|
||||
getDisplayer()->UnsetWidth();
|
||||
|
||||
MESSAGE("GEOMBase_Helper::display myTexture = "<<getDisplayer()->GetTexture())
|
||||
MESSAGE("GEOMBase_Helper::display myTexture = "<<getDisplayer()->GetTexture());
|
||||
|
||||
// Enable activisation of selection
|
||||
getDisplayer()->SetToActivate( true );
|
||||
@ -179,9 +179,11 @@ void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView
|
||||
{
|
||||
if ( !object->_is_nil() ) {
|
||||
QString entry = getEntry( object );
|
||||
getDisplayer()->Erase( new SALOME_InteractiveObject(
|
||||
entry.toLatin1().constData(),
|
||||
"GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
|
||||
QString name = GEOMBase::GetName( object );
|
||||
getDisplayer()->Erase ( new SALOME_InteractiveObject(entry.toLatin1().constData(),
|
||||
"GEOM",
|
||||
name.toLatin1().constData() ),
|
||||
true, updateView );
|
||||
}
|
||||
}
|
||||
|
||||
@ -219,8 +221,12 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object,
|
||||
getDisplayer()->SetToActivate( true );
|
||||
|
||||
QString entry = getEntry( object );
|
||||
getDisplayer()->Redisplay(new SALOME_InteractiveObject
|
||||
(entry.toLatin1().constData(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
|
||||
QString name = GEOMBase::GetName( object );
|
||||
getDisplayer()->Redisplay
|
||||
(new SALOME_InteractiveObject (entry.toLatin1().constData(),
|
||||
"GEOM",
|
||||
name.toLatin1().constData()),
|
||||
false);
|
||||
}
|
||||
|
||||
if ( withChildren ) {
|
||||
@ -237,8 +243,12 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object,
|
||||
if ( !CORBA::is_nil( aChild ) ) {
|
||||
if ( !aChild->_is_nil() ) {
|
||||
QString entry = getEntry( aChild );
|
||||
getDisplayer()->Redisplay( new SALOME_InteractiveObject(
|
||||
entry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
|
||||
QString name = GEOMBase::GetName( aChild );
|
||||
getDisplayer()->Redisplay
|
||||
( new SALOME_InteractiveObject( entry.toLatin1().constData(),
|
||||
"GEOM",
|
||||
name.toLatin1().constData() ),
|
||||
false );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -478,8 +488,11 @@ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const std::list
|
||||
continue;
|
||||
QString anEntry = getEntry( anObj );
|
||||
if ( anEntry != "" )
|
||||
aListOfIO.Append( new SALOME_InteractiveObject(
|
||||
anEntry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
|
||||
{
|
||||
QString aName = GEOMBase::GetName( anObj );
|
||||
aListOfIO.Append( new SALOME_InteractiveObject( anEntry.toLatin1().constData(),
|
||||
"GEOM", aName.toLatin1().constData() ));
|
||||
}
|
||||
}
|
||||
|
||||
getDisplayer()->LocalSelection( aListOfIO, modes );
|
||||
|
@ -327,11 +327,11 @@ GEOM::GEOM_Object_ptr GroupGUI_BooleanDlg::getFather(GEOM::GEOM_Object_ptr theOb
|
||||
QList<GEOM::GeomObjPtr> GroupGUI_BooleanDlg::getSourceObjects()
|
||||
{
|
||||
QList<GEOM::GeomObjPtr> res;
|
||||
for (int i = 0; i < myListShapes.length(); i++) {
|
||||
for ( CORBA::ULong i = 0; i < myListShapes.length(); i++) {
|
||||
GEOM::GeomObjPtr aGeomObjPtr(myListShapes[i]);
|
||||
res << aGeomObjPtr;
|
||||
}
|
||||
for (int i = 0; i < myListTools.length(); i++) {
|
||||
for ( CORBA::ULong i = 0; i < myListTools.length(); i++) {
|
||||
GEOM::GeomObjPtr aGeomObjPtr(myListTools[i]);
|
||||
res << aGeomObjPtr;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (Geom
|
||||
mainFrame()->RadioButton3->close();
|
||||
|
||||
/***************************************************************/
|
||||
/* SIMPLE SELF-INTERSECTION constructor
|
||||
// SIMPLE SELF-INTERSECTION constructor
|
||||
/***************************************************************/
|
||||
mySimpleGrp = new QGroupBox(tr("GEOM_CHECK_INFOS"));
|
||||
QLabel *anObjLbl = new QLabel(tr("GEOM_OBJECT"));
|
||||
@ -139,7 +139,7 @@ MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (Geom
|
||||
aGrpLayout1->addWidget(myShapeList1, 6, 2);
|
||||
|
||||
/***************************************************************/
|
||||
/* FAST SELF-INTERSECTION constructor
|
||||
// FAST SELF-INTERSECTION constructor
|
||||
/***************************************************************/
|
||||
|
||||
myFastGrp = new QGroupBox(tr("GEOM_CHECK_INFOS"), centralWidget());
|
||||
|
@ -475,7 +475,7 @@ void MeasureGUI_CheckShapeDlg::onErrorsListSelectionChanged()
|
||||
|
||||
myGrp->ListBox2->clear();
|
||||
|
||||
if (aCurItem < aErrs.length()) {
|
||||
if (aCurItem < (int)aErrs.length()) {
|
||||
GEOM::GEOM_IMeasureOperations::ShapeError aErr = aErrs[aCurItem];
|
||||
GEOM::ListOfLong aObjLst = aErr.incriminated;
|
||||
QStringList aSubShapeList;
|
||||
|
@ -204,7 +204,7 @@ void MeasureGUI_DistanceDlg::enterEvent(QEvent*)
|
||||
//=================================================================================
|
||||
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("");
|
||||
@ -341,7 +341,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
|
||||
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;
|
||||
|
||||
|
@ -334,9 +334,9 @@ TopAbs_ShapeEnum MeasureGUI_ShapeStatisticsDlg::currentType()
|
||||
bool MeasureGUI_ShapeStatisticsDlg::isValid(QString& theMessage)
|
||||
{
|
||||
if ( myScalarRangeBox->isChecked() ) {
|
||||
RETURN_WITH_MSG( !myMin->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MIN_ERROR") )
|
||||
RETURN_WITH_MSG( !myMax->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MAX_ERROR") )
|
||||
RETURN_WITH_MSG( myMin->text().toDouble() <= myMax->text().toDouble(), tr("GEOM_SHAPE_STATISTICS_MIN_MAX_ERROR") )
|
||||
RETURN_WITH_MSG( !myMin->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MIN_ERROR") );
|
||||
RETURN_WITH_MSG( !myMax->text().isEmpty(), tr("GEOM_SHAPE_STATISTICS_MAX_ERROR") );
|
||||
RETURN_WITH_MSG( myMin->text().toDouble() <= myMax->text().toDouble(), tr("GEOM_SHAPE_STATISTICS_MIN_MAX_ERROR") );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -472,7 +472,7 @@ bool MeasureGUI_ShapeStatisticsDlg::execute(ObjectList& objects)
|
||||
int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
|
||||
QString aTypePrefix = myCBTypes->currentText().replace(' ', '_');
|
||||
QString objIOR, aMin, aMax, aGroupName;
|
||||
SalomeApp_Study* study = getStudy();
|
||||
//SalomeApp_Study* study = getStudy();
|
||||
|
||||
GEOMUtils::Distribution aShapesDistr =
|
||||
GEOMUtils::ComputeDistribution( myShapes, currentType(), myNbIntervals->value(), aRange );
|
||||
|
@ -45,7 +45,7 @@ namespace
|
||||
GEOM::shape_type maxShapeType(const GEOM::ListOfGO& objs)
|
||||
{
|
||||
GEOM::shape_type r = GEOM::SHAPE;
|
||||
for ( int i = 0; i < objs.length(); i++ ) {
|
||||
for ( CORBA::ULong i = 0; i < objs.length(); i++ ) {
|
||||
GEOM::shape_type t = objs[i]->GetShapeType();
|
||||
if ( t == GEOM::COMPOUND || t == GEOM::COMPSOLID )
|
||||
t = objs[i]->GetMaxShapeType();
|
||||
@ -412,7 +412,7 @@ QList<GEOM::GeomObjPtr> OperationGUI_GetSharedShapesDlg::getSourceObjects()
|
||||
{
|
||||
QList<GEOM::GeomObjPtr> res;
|
||||
GEOM::ListOfGO aListPtr(myListShapes);
|
||||
for (int i = 0; i < aListPtr.length(); i++) {
|
||||
for (CORBA::ULong i = 0; i < aListPtr.length(); i++) {
|
||||
GEOM::GeomObjPtr aGeomObjPtr(aListPtr[i]);
|
||||
res << aGeomObjPtr;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void TransformationGUI_OffsetDlg::ClickOnOk()
|
||||
//=================================================================================
|
||||
bool TransformationGUI_OffsetDlg::ClickOnApply()
|
||||
{
|
||||
if ( !onAccept( GroupPoints->CheckButton1->isChecked() ) )
|
||||
if ( !onAccept( /*copy=*/true ))
|
||||
return false;
|
||||
|
||||
initName();
|
||||
|
Loading…
Reference in New Issue
Block a user