Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug: IsSubShapeBelongsTo() always returns true if theSubObjectIndex > 0
[modules/geom.git]
/
src
/
GEOMToolsGUI
/
GEOMToolsGUI_1.cxx
diff --git
a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
index b83b3e77e30da171467a31beb1753d5d0fb24763..b5420a7bb603cc976d787267842407cd4f2f926a 100644
(file)
--- a/
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
+++ b/
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-55,8
+55,6
@@
#include <DependencyTree_Selector.h>
#endif
#include <DependencyTree_Selector.h>
#endif
-#include <Basics_OCCTVersion.hxx>
-
#include <SALOME_ListIO.hxx>
#include <SALOMEDS_SObject.hxx>
#include <SALOME_ListIO.hxx>
#include <SALOMEDS_SObject.hxx>
@@
-126,7
+124,7
@@
// Below macro, when uncommented, switches on simplified (more performant) algorithm
// of auto-color picking up
#define SIMPLE_AUTOCOLOR
// Below macro, when uncommented, switches on simplified (more performant) algorithm
// of auto-color picking up
#define SIMPLE_AUTOCOLOR
-// Below macro, when defined, switches on automatic layouting of OCC and Dependecy views
+// Below macro, when defined, switches on automatic layouting of OCC and Depende
n
cy views
// on Show Dependencies operation
#define LAYOUT_DEPVIEW
// on Show Dependencies operation
#define LAYOUT_DEPVIEW
@@
-168,7
+166,7
@@
void GEOMToolsGUI::OnAutoColor()
QList<SALOMEDS::Color> aReservedColors;
QList<SALOMEDS::Color> aReservedColors;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-256,7
+254,7
@@
void GEOMToolsGUI::OnColor()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
// get active view
SALOME_View* window = displayer.GetActiveView();
// get active view
SALOME_View* window = displayer.GetActiveView();
@@
-308,7
+306,7
@@
void GEOMToolsGUI::OnTexture()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-351,7
+349,7
@@
void GEOMToolsGUI::OnChangeTransparency( bool increase )
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-396,7
+394,7
@@
void GEOMToolsGUI::OnNbIsos( ActionType actionType )
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-466,7
+464,7
@@
void GEOMToolsGUI::OnDeflection()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-496,8
+494,7
@@
void GEOMToolsGUI::OnSelectOnly(int mode)
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( app ) {
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( app ) {
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- GEOM_Displayer aDisp (appStudy);
+ GEOM_Displayer aDisp;
aDisp.GlobalSelection(mode);
getGeometryGUI()->setLocalSelectionMode(mode);
}
aDisp.GlobalSelection(mode);
getGeometryGUI()->setLocalSelectionMode(mode);
}
@@
-530,6
+527,8
@@
void GEOMToolsGUI::OnDiscloseConcealChildren( bool show )
return;
}
return;
}
+ SUIT_OverrideCursor wc;
+ bool toUpdateColorScale = disp->SetUpdateColorScale( false ); // IPAL54049
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
@@
-538,10
+537,12
@@
void GEOMToolsGUI::OnDiscloseConcealChildren( bool show )
if ( obj ) {
_PTR(AttributeExpandable) aExp = B->FindOrCreateAttribute( obj, "AttributeExpandable" );
aExp->SetExpandable( show );
if ( obj ) {
_PTR(AttributeExpandable) aExp = B->FindOrCreateAttribute( obj, "AttributeExpandable" );
aExp->SetExpandable( show );
- if
(!show)
+ if
( !show ) {
disp->EraseWithChildren(IObject,true);
disp->EraseWithChildren(IObject,true);
+ }
} // if ( obj )
} // iterator
} // if ( obj )
} // iterator
+ disp->SetUpdateColorScale( toUpdateColorScale );
}
}
app->updateObjectBrowser( false );
}
}
app->updateObjectBrowser( false );
@@
-593,7
+594,8
@@
void GEOMToolsGUI::OnUnpublishObject() {
QObject::tr( "WRN_STUDY_LOCKED" ) );
return;
}
QObject::tr( "WRN_STUDY_LOCKED" ) );
return;
}
-
+ SUIT_OverrideCursor wc;
+ bool toUpdateColorScale = disp->SetUpdateColorScale( false ); // IPAL54049
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
@@
-612,13
+614,13
@@
void GEOMToolsGUI::OnUnpublishObject() {
}
} // if ( obj )
} // iterator
}
} // if ( obj )
} // iterator
+ disp->SetUpdateColorScale( toUpdateColorScale ); // IPAL54049
aSelMgr->clearSelected();
}
}
app->updateObjectBrowser( false );
app->updateActions();
}
aSelMgr->clearSelected();
}
}
app->updateObjectBrowser( false );
app->updateActions();
}
-
}
void GEOMToolsGUI::OnPublishObject() {
}
void GEOMToolsGUI::OnPublishObject() {
@@
-665,7
+667,7
@@
void GEOMToolsGUI::OnEdgeWidth()
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-708,7
+710,7
@@
void GEOMToolsGUI::OnIsosWidth() {
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-750,7
+752,7
@@
void GEOMToolsGUI::OnBringToFront() {
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-776,7
+778,7
@@
void GEOMToolsGUI::OnClsBringToFront() {
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
if ( !appStudy ) return;
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
if ( !appStudy ) return;
- GEOM_Displayer displayer
( appStudy )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-815,7
+817,7
@@
void GEOMToolsGUI::OnSetMaterial( const QVariant& theParam )
if ( selected.IsEmpty() ) return;
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer
( study )
;
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
@@
-856,8
+858,8
@@
void GEOMToolsGUI::OnCreateFolder()
_PTR(SObject) aFatherSO(aStudy->FindObjectID(anIObject->getEntry()));
if ( !aFatherSO ) return;
_PTR(SObject) aFatherSO(aStudy->FindObjectID(anIObject->getEntry()));
if ( !aFatherSO ) return;
- GeometryGUI::GetGeomGen()->CreateFolder( tr("NEW_FOLDER_NAME").to
Latin1
().constData(),
- _CAST(SObject, aFatherSO)->GetSObject() );
+ GeometryGUI::GetGeomGen()->CreateFolder( tr("NEW_FOLDER_NAME").to
Utf8
().constData(),
+
_CAST(SObject, aFatherSO)->GetSObject() );
app->updateObjectBrowser( false );
}
app->updateObjectBrowser( false );
}
@@
-891,7
+893,7
@@
void GEOMToolsGUI::OnSortChildren()
#ifndef DISABLE_GRAPHICSVIEW
void GEOMToolsGUI::OnShowDependencyTree()
{
#ifndef DISABLE_GRAPHICSVIEW
void GEOMToolsGUI::OnShowDependencyTree()
{
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+
//
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app ) return;
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app ) return;