Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for the bug #42: point C is not activated, but point C is shown in preview in...
[modules/hydro.git]
/
src
/
HYDROGUI
/
HYDROGUI_Displayer.cxx
diff --git
a/src/HYDROGUI/HYDROGUI_Displayer.cxx
b/src/HYDROGUI/HYDROGUI_Displayer.cxx
index d6fc5f61d026cecfb8a8544753850289fda93140..c28de63f9e4b7cf0926fc03c70b5148b00a24961 100644
(file)
--- a/
src/HYDROGUI/HYDROGUI_Displayer.cxx
+++ b/
src/HYDROGUI/HYDROGUI_Displayer.cxx
@@
-27,6
+27,7
@@
#include "HYDROGUI_Prs.h"
#include "HYDROGUI_PrsImageDriver.h"
#include "HYDROGUI_PrsPolylineDriver.h"
#include "HYDROGUI_Prs.h"
#include "HYDROGUI_PrsImageDriver.h"
#include "HYDROGUI_PrsPolylineDriver.h"
+#include "HYDROGUI_PrsZoneDriver.h"
#include "HYDROGUI_Tool.h"
#include <GraphicsView_Viewer.h>
#include "HYDROGUI_Tool.h"
#include <GraphicsView_Viewer.h>
@@
-55,7
+56,7
@@
void HYDROGUI_Displayer::SetToUpdate( const HYDROData_SequenceOfObjects& theObjs
GraphicsView_ObjectList anObjectList = aViewPort->getObjects();
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
GraphicsView_ObjectList anObjectList = aViewPort->getObjects();
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
- Handle(HYDROData_
Object
) anObj = theObjs.Value( i );
+ Handle(HYDROData_
Entity
) anObj = theObjs.Value( i );
if( anObj.IsNull() )
continue;
if( anObj.IsNull() )
continue;
@@
-114,7
+115,7
@@
void HYDROGUI_Displayer::Update( const HYDROData_SequenceOfObjects& theObjs,
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
- const Handle(HYDROData_
Object
)& anObj = theObjs.Value( i );
+ const Handle(HYDROData_
Entity
)& anObj = theObjs.Value( i );
if( anObj.IsNull() )
anObjectsToErase.Append( anObj );
else
if( anObj.IsNull() )
anObjectsToErase.Append( anObj );
else
@@
-145,7
+146,7
@@
void HYDROGUI_Displayer::Erase( const HYDROData_SequenceOfObjects& theObjs,
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
// the object may be null or dead
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
// the object may be null or dead
- const Handle(HYDROData_
Object
)& anObj = theObjs.Value( i );
+ const Handle(HYDROData_
Entity
)& anObj = theObjs.Value( i );
if( HYDROGUI_Prs* aPrs = HYDROGUI_Tool::GetPresentation( anObj, anObjectList ) )
{
aViewPort->removeItem( aPrs );
if( HYDROGUI_Prs* aPrs = HYDROGUI_Tool::GetPresentation( anObj, anObjectList ) )
{
aViewPort->removeItem( aPrs );
@@
-171,7
+172,7
@@
void HYDROGUI_Displayer::Display( const HYDROData_SequenceOfObjects& theObjs,
GraphicsView_ObjectList anObjectList = aViewPort->getObjects();
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
GraphicsView_ObjectList anObjectList = aViewPort->getObjects();
for( int i = 1, n = theObjs.Length(); i <= n; i++ )
{
- Handle(HYDROData_
Object
) anObj = theObjs.Value( i );
+ Handle(HYDROData_
Entity
) anObj = theObjs.Value( i );
if( anObj.IsNull() )
continue;
if( anObj.IsNull() )
continue;
@@
-189,7
+190,7
@@
void HYDROGUI_Displayer::Display( const HYDROData_SequenceOfObjects& theObjs,
if( aPrs )
{
if( aPrs )
{
- bool anIsVisible =
anObj->IsVisible( (size_t)aViewer
);
+ bool anIsVisible =
myModule->isObjectVisible( (size_t)aViewer, anObj
);
aPrs->setVisible( anIsVisible );
}
}
aPrs->setVisible( anIsVisible );
}
}
@@
-213,7
+214,7
@@
void HYDROGUI_Displayer::purgeObjects( const int theViewerId )
{
if( HYDROGUI_Prs* aPrs = dynamic_cast<HYDROGUI_Prs*>( anIter.next() ) )
{
{
if( HYDROGUI_Prs* aPrs = dynamic_cast<HYDROGUI_Prs*>( anIter.next() ) )
{
- Handle(HYDROData_
Object
) anObject = aPrs->getObject();
+ Handle(HYDROData_
Entity
) anObject = aPrs->getObject();
if( !anObject.IsNull() && anObject->IsRemoved() )
{
aViewPort->removeItem( aPrs );
if( !anObject.IsNull() && anObject->IsRemoved() )
{
aViewPort->removeItem( aPrs );
@@
-223,7
+224,7
@@
void HYDROGUI_Displayer::purgeObjects( const int theViewerId )
}
}
}
}
-HYDROGUI_PrsDriver* HYDROGUI_Displayer::getDriver( const Handle(HYDROData_
Object
)& theObj )
+HYDROGUI_PrsDriver* HYDROGUI_Displayer::getDriver( const Handle(HYDROData_
Entity
)& theObj )
{
HYDROGUI_PrsDriver* aDriver = NULL;
ObjectKind aKind = theObj->GetKind();
{
HYDROGUI_PrsDriver* aDriver = NULL;
ObjectKind aKind = theObj->GetKind();
@@
-236,15
+237,20
@@
HYDROGUI_PrsDriver* HYDROGUI_Displayer::getDriver( const Handle(HYDROData_Object
{
case KIND_IMAGE:
aDriver = new HYDROGUI_PrsImageDriver();
{
case KIND_IMAGE:
aDriver = new HYDROGUI_PrsImageDriver();
- myPrsDriversMap[ aKind ] = aDriver;
break;
case KIND_POLYLINE:
aDriver = new HYDROGUI_PrsPolylineDriver();
break;
case KIND_POLYLINE:
aDriver = new HYDROGUI_PrsPolylineDriver();
- myPrsDriversMap[ aKind ] = aDriver;
+ break;
+ case KIND_ZONE:
+ aDriver = new HYDROGUI_PrsZoneDriver();
break;
default:
break;
}
break;
default:
break;
}
+
+ if ( aDriver )
+ myPrsDriversMap[ aKind ] = aDriver;
}
}
+
return aDriver;
}
return aDriver;
}