mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
IPAL22837: TC 6.4.0: Auto Color does not reset color of group of edges
This commit is contained in:
parent
84fa6ee9f3
commit
f07c1d15eb
@ -1433,7 +1433,7 @@ void GeometryGUI::initialize( CAM_Application* app )
|
|||||||
QString clientOCCorOB_AndSomeVisible = clientOCCorOB + " and selcount>0 and isVisible";
|
QString clientOCCorOB_AndSomeVisible = clientOCCorOB + " and selcount>0 and isVisible";
|
||||||
|
|
||||||
QString autoColorPrefix =
|
QString autoColorPrefix =
|
||||||
"(client='ObjectBrowser' or client='OCCViewer') and type='Shape' and selcount=1 and isOCC=true";
|
"(client='ObjectBrowser' or client='OCCViewer' or client='VTKViewer') and type='Shape' and selcount=1";
|
||||||
|
|
||||||
QtxPopupMgr* mgr = popupMgr();
|
QtxPopupMgr* mgr = popupMgr();
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ void GEOMToolsGUI::OnAutoColor()
|
|||||||
|
|
||||||
SUIT_OverrideCursor();
|
SUIT_OverrideCursor();
|
||||||
|
|
||||||
appStudy->setObjectProperty( aMgrId, aChildObject->GetEntry(), GEOM::propertyName( GEOM::Color ), c );
|
appStudy->setObjectProperty( aMgrId, aChildObject->GetStudyEntry(), GEOM::propertyName( GEOM::Color ), c );
|
||||||
Handle( SALOME_InteractiveObject ) io = new SALOME_InteractiveObject( aChildObject->GetStudyEntry(), "GEOM", "" );
|
Handle( SALOME_InteractiveObject ) io = new SALOME_InteractiveObject( aChildObject->GetStudyEntry(), "GEOM", "" );
|
||||||
if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
|
if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
|
||||||
}
|
}
|
||||||
@ -260,10 +260,17 @@ void GEOMToolsGUI::OnColor()
|
|||||||
color = QColorDialog::getColor( v.value<QColor>(), app->desktop() );
|
color = QColorDialog::getColor( v.value<QColor>(), app->desktop() );
|
||||||
if ( !color.isValid() ) return;
|
if ( !color.isValid() ) return;
|
||||||
|
|
||||||
|
SALOMEDS::Color aSColor;
|
||||||
|
aSColor.R = (double)color.red() / 255.0;
|
||||||
|
aSColor.G = (double)color.green() / 255.0;
|
||||||
|
aSColor.B = (double)color.blue() / 255.0;
|
||||||
|
|
||||||
// iterate through list of objects and assign new color
|
// iterate through list of objects and assign new color
|
||||||
SUIT_OverrideCursor();
|
SUIT_OverrideCursor();
|
||||||
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
|
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
|
||||||
Handle( SALOME_InteractiveObject ) io = It.Value();
|
Handle( SALOME_InteractiveObject ) io = It.Value();
|
||||||
|
GEOM::GEOM_Object_var aObject = GEOMBase::ConvertIOinGEOMObject( io );
|
||||||
|
if ( !CORBA::is_nil( aObject ) ) aObject->SetColor( aSColor );
|
||||||
appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Color ), color );
|
appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Color ), color );
|
||||||
if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
|
if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user