From ba4c069a64193d6ae67583c5177f9e051d7b0b48 Mon Sep 17 00:00:00 2001 From: dcq Date: Fri, 30 Jan 2004 09:43:33 +0000 Subject: [PATCH] DCQ : Debug Transparency --- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 5 ++--- src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 5eddb4047..a977323fc 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -396,11 +396,10 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) } case 8033: // TRANSPARENCY - POPUP VIEWER { - OCCViewer_Viewer3d* v3d; Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) { + if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); + ic = v3d->getAISContext(); } GEOMBase_TransparencyDlg *aDlg = new GEOMBase_TransparencyDlg(parent, "", Sel, ic); break; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 6fab217a5..122cc9848 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -30,6 +30,7 @@ using namespace std; #include "QAD_RightFrame.h" #include "SALOME_ListIteratorOfListIO.hxx" +#include "OCCViewer_Viewer3d.h" #include #include @@ -221,6 +222,8 @@ void GEOMBase_TransparencyDlg::ValueHasChanged(int newValue) } QApplication::setOverrideCursor(Qt::waitCursor); + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); + Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); for(;It.More(); It.Next()) { Handle(SALOME_InteractiveObject) IObject = It.Value(); Standard_Boolean found; @@ -229,10 +232,10 @@ void GEOMBase_TransparencyDlg::ValueHasChanged(int newValue) QApplication::restoreOverrideCursor(); return; } - this->myIc->SetTransparency(Shape, newValue / 10.0, false); - myIc->Redisplay(Shape, Standard_False, Standard_True); + ic->SetTransparency(Shape, newValue / 10.0, false); + ic->Redisplay(Shape, Standard_False, Standard_True); } - myIc->UpdateCurrentViewer(); + ic->UpdateCurrentViewer(); } QApplication::restoreOverrideCursor(); return; -- 2.39.2