return NULL;
}
- VISU_Actor*
+ VISU_Actor*
PublishInView(const SalomeApp_Module* theModule,
VISU::Prs3d_i* thePrs)
{
return aActor;
}
- VISU_Actor*
+ VISU_Actor*
UpdateViewer(const SalomeApp_Module* theModule,
- VISU::Prs3d_i* thePrs,
+ VISU::Prs3d_i* thePrs,
bool theDispOnly)
{
SVTK_ViewWindow* vw = GetViewWindow( theModule );
for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL; ){
if(!SALOME_Actor::SafeDownCast(anActor))
continue;
- if(anActor->IsA("VISU_Actor")){
+ if(anActor->IsA("VISU_Actor")){
anVISUActor = VISU_Actor::SafeDownCast(anActor);
- VISU::Prs3d_i* aPrs = anVISUActor->GetPrs3d();
+ VISU::Prs3d_i* aPrs = anVISUActor->GetPrs3d();
if(aPrs == NULL) continue;
if (thePrs == aPrs) {
aResActor = anVISUActor->GetParent();
thePrs->UpdateActor(aResActor);
aResActor->VisibilityOn();
-
+
} else if (theDispOnly) {
anVISUActor->GetParent()->VisibilityOff();
} else {
} else if (theDispOnly && anActor->GetVisibility()) {
anActor->VisibilityOff();
} else {
- }
+ }
}
- if (aResActor)
+ if (aResActor)
return aResActor;
anVISUActor = PublishInView( theModule, thePrs );
return anVISUActor;
}
+ void
+ RepaintViewWindows (const SalomeApp_Module* theModule,
+ const Handle(SALOME_InteractiveObject)& theIObject)
+ {
+ TViewWindows aViewWindows;
+ if (SalomeApp_Application* anApp = theModule->getApp()) {
+ ViewManagerList aViewManagerList;
+ anApp->viewManagers(SVTK_Viewer::Type(),aViewManagerList);
+ QPtrListIterator<SUIT_ViewManager> anIter (aViewManagerList);
+ while (SUIT_ViewManager* aViewManager = anIter.current()) {
+ QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+ for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
+ if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
+ if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
+ if (vw->isVisible(theIObject)) {
+ vw->getRenderer()->ResetCameraClippingRange();
+ vw->Repaint();
+ vw->highlight(theIObject, true, true);
+ }
+ }
+ }
+ }
+ ++anIter;
+ }
+ }
+ }
+
VISU_Actor*
FindActor(SVTK_ViewWindow* theViewWindow,
const char* theEntry)
} catch (std::runtime_error& ex) {
INFOS(ex.what());
QApplication::restoreOverrideCursor();
- SUIT_MessageBox::warn1 (GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + " " + QObject::tr(ex.what()),
+ SUIT_MessageBox::warn1 (GetDesktop(theModule), QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + " " + QObject::tr(ex.what()),
QObject::tr("BUT_OK"));
TViewWindows aViewWindows = GetViews(theModule);
}
if ( !theCurve->IsAuto() ) {
plotCurve->setLine( (Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth() );
- plotCurve->setMarker( (Plot2d_Curve::MarkerType)theCurve->GetMarker() );
+ plotCurve->setMarker( (Plot2d_Curve::MarkerType)theCurve->GetMarker() );
SALOMEDS::Color color = theCurve->GetColor();
plotCurve->setColor( QColor( (int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.) ) );
}
}
}
- void
- PlotTable(const SalomeApp_Module* theModule,
- VISU::Table_i* table,
+ void
+ PlotTable(const SalomeApp_Module* theModule,
+ VISU::Table_i* table,
int theDisplaying)
{
SPlot2d_Viewer* aView = GetPlot2dViewer( theModule, true ); // create if necessary
if ( !aPlot )
return;
- if ( theDisplaying == VISU::eDisplayOnly )
+ if ( theDisplaying == VISU::eDisplayOnly )
aPlot->EraseAll();
QList<Plot2d_Curve> clist;
aPlot->getCurves( clist );
}
void
- PlotCurve(const SalomeApp_Module* theModule,
- VISU::Curve_i* theCurve,
+ PlotCurve(const SalomeApp_Module* theModule,
+ VISU::Curve_i* theCurve,
int theDisplaying)
{
SPlot2d_Viewer* aView = GetPlot2dViewer( theModule, true );
if ( !aPlot )
return;
-// if ( theDisplaying == VISU::eDisplayOnly )
+// if ( theDisplaying == VISU::eDisplayOnly )
// aPlot->EraseAll();
QList<Plot2d_Curve> clist;
aPlot->getCurves( clist );
}
void
- PlotContainer(const SalomeApp_Module* theModule,
- VISU::Container_i* container,
+ PlotContainer(const SalomeApp_Module* theModule,
+ VISU::Container_i* container,
int theDisplaying)
{
SPlot2d_Viewer* aView = GetPlot2dViewer( theModule, true );
if ( !aPlot )
return;
- if ( theDisplaying == VISU::eDisplayOnly )
+ if ( theDisplaying == VISU::eDisplayOnly )
aPlot->EraseAll();
QList<Plot2d_Curve> clist;
aPlot->getCurves( clist );
if ( theCurve && theCurve->IsValid() ) {
SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>
(aView->getCurveByIO(new SALOME_InteractiveObject (theCurve->GetEntry(), "", "")));
-
+
UpdateCurve( theCurve, aPlot, plotCurve, theDisplaying );
if ( plotCurve && theDisplaying == VISU::eErase ) {
if ( !CORBA::is_nil( aTable ) && !CORBA::is_nil( aContainer ) ) {
VISU::Table_i* pTable = dynamic_cast<VISU::Table_i*>(VISU::GetServant(aTable).in());
VISU::Container_i* pContainer = dynamic_cast<VISU::Container_i*>(VISU::GetServant(aContainer).in());
-
+
if ( pContainer && pTable ) {
for ( int i = 2; i <= pTable->GetNbRows(); i++ ) {
CORBA::Object_var aNewCurve = GetVisuGen( theModule )->CreateCurve( pTable->_this(), 1, i );