1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025765: Coding rules - clean up code from obsolete macro checks

Unused code paths (including definition of these macros and meaningless comments) were eliminated.
This commit is contained in:
apn
2015-02-24 19:27:20 +03:00
committed by bugmaster
parent f1b0b4f9c6
commit d2094e110f
130 changed files with 11 additions and 1775 deletions

View File

@@ -14,17 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#define UKI60826 //GG_161199 Use the requested selection color instead of default
#define IMP280200 //GG Don't returns a NULL shape in SelectedShape()
// method when the current selected is a shape !
#define BUC60814 //GG_300101 Idem UKI60826
#define OCC138 //VTN Avoding infinit loop in AddOrRemoveCurrentObject method.
#define OCC9657
#include <AIS_InteractiveContext.jxx>
#include <SelectMgr_EntityOwner.hxx>
#include <AIS_Selection.hxx>
@@ -50,10 +39,8 @@
#include <Prs3d_Presentation.hxx>
#ifdef OCC9657
#include <AIS_MapOfInteractive.hxx>
#include <AIS_MapIteratorOfMapOfInteractive.hxx>
#endif
//=======================================================================
//function : MoveTo
@@ -531,11 +518,7 @@ void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject
Standard_Boolean HasHiCol;
if(IsHilighted(anIObj,HasHiCol,HiCol)){
if(HasHiCol && HiCol!= mySelectionColor) {
#ifdef UKI60826
HilightWithColor(anIObj,mySelectionColor,updateviewer);
#else
Hilight(anIObj,updateviewer);
#endif
}
}
return;
@@ -568,19 +551,11 @@ void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject
Standard_Boolean HasHiCol;
if(IsHilighted(anIObj,HasHiCol,HiCol)){
if(HasHiCol && HiCol!= mySelectionColor) {
#ifdef UKI60826
HilightWithColor(anIObj,mySelectionColor,Standard_False);
#else
Hilight(anIObj,Standard_False);
#endif
}
}
else{
#ifdef UKI60826
HilightWithColor(anIObj,mySelectionColor,Standard_False);
#else
Hilight(anIObj,Standard_False);
#endif
}
if (updateviewer)
UpdateCurrentViewer();
@@ -613,11 +588,7 @@ AddOrRemoveCurrentObject(const Handle(AIS_InteractiveObject)& anIObj,
Standard_Integer mod = (SelStat==AIS_SS_Added) ? 1 : 0;
anIObj->State(mod);
if(mod==1)
#ifdef BUC60814
HilightWithColor(anIObj,mySelectionColor,Standard_False);
#else
Hilight(anIObj,Standard_False);
#endif
else
Unhilight(anIObj,Standard_False);
@@ -745,11 +716,7 @@ void AIS_InteractiveContext::HilightCurrents(const Standard_Boolean updateviewer
while (sel->More()) {
TR = sel->Value();
IO = *((Handle(AIS_InteractiveObject)*)&TR);
#ifdef BUC60814
HilightWithColor(IO,mySelectionColor,Standard_False);
#else
Hilight(IO,Standard_False);
#endif
sel->Next();
}
if(updateviewer)
@@ -818,11 +785,7 @@ void AIS_InteractiveContext::HilightSelected(const Standard_Boolean updateviewer
while (sel->More()) {
TR = sel->Value();
IO = *((Handle(AIS_InteractiveObject)*)&TR);
#ifdef BUC60814
HilightWithColor(IO,mySelectionColor,Standard_False);
#else
Hilight(IO,Standard_False);
#endif
sel->Next();
}
}
@@ -1039,11 +1002,9 @@ void AIS_InteractiveContext::NextSelected()
Standard_Boolean AIS_InteractiveContext::HasSelectedShape() const
{
if(!HasOpenedContext()) {
#ifdef IMP280200
Handle(AIS_Shape) shape =
Handle(AIS_Shape)::DownCast(SelectedInteractive());
if( !shape.IsNull() ) return Standard_True;
#endif
return Standard_False;
}
return myLocalContexts(myCurLocalIndex)->HasSelectedShape();