if ( aViewManager && myPreviewPrs && !myEditedObject.IsNull() )
{
- TopoDS_Shape aLandCoverMapShape = myEditedObject->GetShape();
- if( !aLandCoverMapShape.IsNull() )
- {
- if ( myOperationId == RemoveLandCoverId ||
- myOperationId == MergeLandCoverId ||
- myOperationId == ChangeLandCoverTypeId )
- myPreviewPrs->setSelectionMode( AIS_Shape::SelectionMode( TopAbs_FACE ) );
- myPreviewPrs->setShape( aLandCoverMapShape );
- }
+ myPreviewPrs->update( false, false );
+ if ( myOperationId == RemoveLandCoverId ||
+ myOperationId == MergeLandCoverId ||
+ myOperationId == ChangeLandCoverTypeId )
+ myPreviewPrs->setSelectionMode( AIS_Shape::SelectionMode( TopAbs_FACE ) );
}
module()->update( UF_OCCViewer | UF_FitAll );
continue;
}
- QColor aUndefinedColor( Qt::gray );
- aColor = aUndefinedColor;
- // TODO
- //QColor aColor = isLandCoverColoringOn ? aUndefinedColor : aLandCoverMap->GetFillingColor();
-
- if ( isLandCoverColoringOn && !aTable.IsNull() ) {
- QString aStricklerType = "";
- // TODO
- //aLandCoverMap->GetStricklerType().toLatin1().constData();
-
- if ( aTable->HasType( aStricklerType ) ) {
- double aStricklerCoeff = aTable->Get( aStricklerType, 0 );
- Quantity_Color aShapeColor;
- if ( aColorScale->FindColor( aStricklerCoeff, aShapeColor ) ) {
- aColor = QColor( aShapeColor.Red() * 255,
- aShapeColor.Green() * 255,
- aShapeColor.Blue() * 255 );
- }
- }
- }
-
- aLandCoverMapShape->setFillingColor( aColor, true, true );
aLandCoverMapShape->setScalarMapModeEnabled( isLandCoverColoringOn );
theViewer->getAISContext()->Redisplay( aLandCoverMapShape->getAISObject() );
}
const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes();
if ( !anAttributes.IsNull() )
{
- if ( myDisplayMode == AIS_Shaded )
+ if ( myDisplayMode == AIS_Shaded && myFillingColor.isValid() )
{
Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ),
getQuantityColorVal( myFillingColor.green() ),
myDisplayer( theDisplayer ),
myIsScalarMapMode( theIsScalarMode )
{
+ setFillingColor( QColor(), false, false );
}
HYDROGUI_ShapeLandCoverMap::~HYDROGUI_ShapeLandCoverMap()