mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-04 17:48:27 +05:00
Remove unnecessary function setCustomData() / getCustomData()
This commit is contained in:
parent
e403b95e1b
commit
8c904db605
@ -401,7 +401,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
if ( !viewWindow )
|
if ( !viewWindow )
|
||||||
viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
|
viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
|
||||||
if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
|
if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
|
||||||
viewWindow->setCustomData( "VectorsMode", QVariant( mode ) );
|
viewWindow->setProperty( "VectorsMode", mode );
|
||||||
SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
|
SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
|
||||||
vtkActorCollection* allActors = vw->getRenderer()->GetActors();
|
vtkActorCollection* allActors = vw->getRenderer()->GetActors();
|
||||||
allActors->InitTraversal();
|
allActors->InitTraversal();
|
||||||
@ -418,7 +418,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
GeometryGUI::Modified();
|
GeometryGUI::Modified();
|
||||||
}
|
}
|
||||||
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||||
viewWindow->setCustomData( "VectorsMode", QVariant( mode ) );
|
viewWindow->setProperty( "VectorsMode", mode );
|
||||||
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
|
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
|
||||||
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
||||||
AIS_ListOfInteractive List;
|
AIS_ListOfInteractive List;
|
||||||
@ -448,7 +448,7 @@ int DisplayGUI::GetVectorMode( SUIT_ViewWindow* viewWindow )
|
|||||||
{
|
{
|
||||||
if ( !viewWindow )
|
if ( !viewWindow )
|
||||||
viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
|
viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
|
||||||
return viewWindow->getCustomData( "VectorsMode" ).toBool();
|
return viewWindow->property( "VectorsMode" ).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
|
@ -1923,7 +1923,7 @@ void GeometryGUI::onViewAboutToShow()
|
|||||||
QAction* a = action( GEOMOp::OpSwitchVectors );
|
QAction* a = action( GEOMOp::OpSwitchVectors );
|
||||||
if ( window ) {
|
if ( window ) {
|
||||||
a->setEnabled(true);
|
a->setEnabled(true);
|
||||||
bool vmode = window->getCustomData("VectorsMode").toBool();
|
bool vmode = window->property("VectorsMode").toBool();
|
||||||
a->setText ( vmode == 1 ? tr( "MEN_VECTOR_MODE_OFF" ) : tr("MEN_VECTOR_MODE_ON") );
|
a->setText ( vmode == 1 ? tr( "MEN_VECTOR_MODE_OFF" ) : tr("MEN_VECTOR_MODE_ON") );
|
||||||
} else {
|
} else {
|
||||||
a->setText ( tr("MEN_VECTOR_MODE_ON") );
|
a->setText ( tr("MEN_VECTOR_MODE_ON") );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user