mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-02 10:24:30 +05:00
This commit was generated by cvs2git to create tag 'V3_2_9sp1'.
Sprout from V3_2_0_maintainance 2007-12-19 15:04:04 UTC jfa <jfa@opencascade.com> 'NPAL18363: EDF635: We can now select any object in all window.' Cherrypick from V3_2_0_maintainance 2007-10-24 06:46:07 UTC jfa <jfa@opencascade.com> 'NPAL14856: Get The Normal of a Face.': src/GEOMGUI/GeometryGUI.cxx Cherrypick from V3_2_0_maintainance 2007-12-20 11:01:43 UTC dmv <dmv@opencascade.com> 'NPAL 16768': src/MeasureGUI/MeasureGUI_NormaleDlg.cxx
This commit is contained in:
parent
add6b67d1c
commit
20e6d30e5a
@ -212,10 +212,10 @@ GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName )
|
||||
// try to load library if it is not loaded yet
|
||||
QCString libs;
|
||||
#ifndef WNT
|
||||
if ( (libs = getenv( "LD_LIBRARY_PATH" )) ) {
|
||||
if( ( libs = getenv( "LD_LIBRARY_PATH" ) ) ) {
|
||||
QStringList dirList = QStringList::split( ":", libs, false ); // skip empty entries
|
||||
#else
|
||||
if ( (libs = getenv( "PATH" )) ) {
|
||||
if( ( libs = getenv( "PATH" ) ) ) {
|
||||
QStringList dirList = QStringList::split( ";", libs, false ); // skip empty entries
|
||||
#endif
|
||||
for( int i = dirList.count()-1; i >= 0; i-- ) {
|
||||
@ -1225,12 +1225,12 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
|
||||
myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast<SVTK_Viewer*>( vm->getViewModel() ), sm ) );
|
||||
|
||||
// disable OCC selectors
|
||||
//getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
|
||||
getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
|
||||
for ( GEOMGUI_OCCSelector* sr = myOCCSelectors.first(); sr; sr = myOCCSelectors.next() )
|
||||
sr->setEnabled(true);
|
||||
|
||||
// disable VTK selectors
|
||||
//getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() );
|
||||
getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() );
|
||||
for ( LightApp_VTKSelector* sr = myVTKSelectors.first(); sr; sr = myVTKSelectors.next() )
|
||||
sr->setEnabled(true);
|
||||
|
||||
|
@ -32,6 +32,12 @@
|
||||
#include "SalomeApp_Application.h"
|
||||
#include "LightApp_SelectionMgr.h"
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
|
||||
#include <qlabel.h>
|
||||
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
@ -177,14 +183,36 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
|
||||
if (!testResult)
|
||||
return;
|
||||
|
||||
QString aName = GEOMBase::GetName(aSelectedObject);
|
||||
|
||||
if (myEditCurrentArgument == GroupArgs->LineEdit1) {
|
||||
myFace = aSelectedObject;
|
||||
}
|
||||
else if (myEditCurrentArgument == GroupArgs->LineEdit2) {
|
||||
TopoDS_Shape aShape;
|
||||
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
|
||||
{
|
||||
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes(firstIObject(), aMap);
|
||||
if (aMap.Extent() == 1) // Local Selection
|
||||
{
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
int anIndex = aMap( 1 );
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
aName += QString(":vertex_%1").arg(anIndex);
|
||||
}
|
||||
else // Global Selection
|
||||
{
|
||||
if (aShape.ShapeType() != TopAbs_VERTEX) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
myPoint = aSelectedObject;
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
|
||||
myEditCurrentArgument->setText( aName );
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
@ -211,14 +239,14 @@ void MeasureGUI_NormaleDlg::LineEditReturnPressed()
|
||||
void MeasureGUI_NormaleDlg::SetEditCurrentArgument()
|
||||
{
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
globalSelection(GEOM_FACE);
|
||||
|
||||
if (send == GroupArgs->PushButton1) {
|
||||
myEditCurrentArgument = GroupArgs->LineEdit1;
|
||||
globalSelection(GEOM_FACE);
|
||||
}
|
||||
else if (send == GroupArgs->PushButton2) {
|
||||
myEditCurrentArgument = GroupArgs->LineEdit2;
|
||||
globalSelection(GEOM_POINT);
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
|
Loading…
x
Reference in New Issue
Block a user