X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_NbSegmentsCreator.cxx;h=0d86a141a936f791c0bd747c00e84fe178d4e626;hp=3e2bd4e433bb8e0cd0c68bc7dce560b64546bf77;hb=c41b8e1caac50cdcd1bea8be471e9f5b3a644a51;hpb=bd8f1aee7c78f7d2eb82bd4fec5e08c9e3d280ce diff --git a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx index 3e2bd4e43..0d86a141a 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,8 +25,9 @@ // SMESH includes // #include "StdMeshersGUI_NbSegmentsCreator.h" -#include "StdMeshersGUI_DistrTable.h" #include "StdMeshersGUI_DistrPreview.h" +#include "StdMeshersGUI_DistrTable.h" +#include "StdMeshersGUI_PropagationHelperWdg.h" #include "StdMeshersGUI_SubShapeSelectorWdg.h" #include @@ -214,21 +215,30 @@ QFrame* StdMeshersGUI_NbSegmentsCreator::buildFrame() QString aMainEntry = getMainShapeEntry(); if ( aGeomEntry == "" ) aGeomEntry = h->GetObjectEntry(); - myDirectionWidget->SetGeomShapeEntry( aGeomEntry ); - myDirectionWidget->SetMainShapeEntry( aMainEntry ); + myDirectionWidget->SetGeomShapeEntry( aGeomEntry, aMainEntry ); myDirectionWidget->SetListOfIDs( h->GetReversedEdges() ); edgeLay->addWidget( myDirectionWidget ); lay->addWidget( myReversedEdgesBox ); - lay->setStretchFactor( GroupC1, 2); + lay->setStretchFactor( GroupC1, 1); lay->setStretchFactor( myReversedEdgesBox, 1); - + + myReversedEdgesHelper = 0; + if ( !aGeomEntry.isEmpty() || !aMainEntry.isEmpty() ) + { + myReversedEdgesHelper = new StdMeshersGUI_PropagationHelperWdg( myDirectionWidget, fr, false ); + lay->addWidget( myReversedEdgesHelper ); + lay->setStretchFactor( myReversedEdgesHelper, 1 ); + } + connect( myNbSeg, SIGNAL( valueChanged( const QString& ) ), this, SLOT( onValueChanged() ) ); connect( myDistr, SIGNAL( activated( int ) ), this, SLOT( onValueChanged() ) ); connect( myTable, SIGNAL( valueChanged( int, int ) ), this, SLOT( onValueChanged() ) ); connect( myExpr, SIGNAL( textChanged( const QString& ) ), this, SLOT( onValueChanged() ) ); connect( myConv, SIGNAL( buttonClicked( int ) ), this, SLOT( onValueChanged() ) ); + onValueChanged(); + return fr; } @@ -431,8 +441,12 @@ void StdMeshersGUI_NbSegmentsCreator::onValueChanged() myScale->setShown( distr==1 ); myLScale->setShown( distr==1 ); - myReversedEdgesBox->setShown( !distr==0 ); - myDirectionWidget->showPreview( !distr==0 ); + myReversedEdgesBox->setShown( distr!=0 ); + if ( myReversedEdgesHelper ) { + myReversedEdgesHelper->Clear(); + myReversedEdgesHelper->setShown( distr!=0 ); + } + myDirectionWidget->ShowPreview( distr!=0 ); bool isFunc = distr==2 || distr==3; myPreview->setShown( isFunc );