From: vsr Date: Wed, 16 Mar 2011 11:59:37 +0000 (+0000) Subject: Remove unnecessary function setCustomData() / getCustomData() X-Git-Tag: Start_BR_19998_21191~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c904db605926cc31680ca031ce5098a193bfdc2;p=modules%2Fgeom.git Remove unnecessary function setCustomData() / getCustomData() --- diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index aed7a556f..a508f889f 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -401,7 +401,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow ) if ( !viewWindow ) viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow(); if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) { - viewWindow->setCustomData( "VectorsMode", QVariant( mode ) ); + viewWindow->setProperty( "VectorsMode", mode ); SVTK_ViewWindow* vw = dynamic_cast( viewWindow ); vtkActorCollection* allActors = vw->getRenderer()->GetActors(); allActors->InitTraversal(); @@ -418,7 +418,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow ) GeometryGUI::Modified(); } 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(); Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); AIS_ListOfInteractive List; @@ -448,7 +448,7 @@ int DisplayGUI::GetVectorMode( SUIT_ViewWindow* viewWindow ) { if ( !viewWindow ) viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow(); - return viewWindow->getCustomData( "VectorsMode" ).toBool(); + return viewWindow->property( "VectorsMode" ).toBool(); } //===================================================================================== diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 60994058d..c306237a4 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -1923,7 +1923,7 @@ void GeometryGUI::onViewAboutToShow() QAction* a = action( GEOMOp::OpSwitchVectors ); if ( window ) { 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") ); } else { a->setText ( tr("MEN_VECTOR_MODE_ON") );