erasePreview();
// Set the clipping plane back
- Handle(V3d_View) aView3d = myView->getViewPort()->getView();
+ /*Handle(V3d_View) aView3d = myView->getViewPort()->getView();
if ( !aView3d.IsNull() && !myClippingPlane.IsNull() )
- aView3d->SetPlaneOn( myClippingPlane );
+ aView3d->SetPlaneOn( myClippingPlane );*/
myAction->setChecked( false );
*/
void OCCViewer_ClippingDlg::showEvent( QShowEvent* e )
{
- ReserveClippingPlane();
+ //ReserveClippingPlane();
QDialog::showEvent( e );
onPreview( PreviewChB->isChecked() );
erasePreview();
// Set the clipping plane back
- Handle(V3d_View) aView3d = myView->getViewPort()->getView();
+ /*Handle(V3d_View) aView3d = myView->getViewPort()->getView();
if ( !aView3d.IsNull() && !myClippingPlane.IsNull() )
aView3d->SetPlaneOn( myClippingPlane );
-
+ */
myAction->setChecked( false );
reject();
erasePreview();
- ReserveClippingPlane();
+ //ReserveClippingPlane();
}
/*!
myPreviewPlane->SetSize( aSize, aSize );
// Deactivate clipping planes
- myView->getViewPort()->getView()->SetPlaneOff();
+ //myView->getViewPort()->getView()->SetPlaneOff();
+ //myView->setPlaneOff();
ic->Display( myPreviewPlane, 1, -1, false );
ic->SetWidth( myPreviewPlane, 10, false );
*/
void OCCViewer_ClippingDlg::ReserveClippingPlane()
{
- Handle(V3d_View) aView3d = myView->getViewPort()->getView();
+ /*Handle(V3d_View) aView3d = myView->getViewPort()->getView();
if ( !aView3d.IsNull() )
{
aView3d->InitActivePlanes();
if ( aView3d->MoreActivePlanes() )
myClippingPlane = aView3d->ActivePlane();
- }
+ }*/
}
void OCCViewer_ClippingDlg::onViewShow()
{
foreach (OCCViewer_ViewWindow* aView, myViews) {
aView->setCuttingPlane(on, x, y, z, dx, dy, dz);
+ aView->update();
}
}
{
foreach (OCCViewer_ViewWindow* aView, myViews) {
aView->setCuttingPlane(on, thePln);
+ aView->update();
}
}
else
myActionsMap[ ClippingId ]->setIcon(aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_CLIPPING" )));
*/
+ OCCViewer_ViewWindow* aParent = dynamic_cast<OCCViewer_ViewWindow*>(parent()->parent());
+ if (!aParent)
+ aParent = this;
if ( on )
- {
- if ( !myClippingDlg )
{
- myClippingDlg = new OCCViewer_ClippingDlg( this );
- myClippingDlg->SetAction( myClippingAction );
- }
+ if ( !myClippingDlg )
+ {
+ myClippingDlg = new OCCViewer_ClippingDlg( aParent );
+ myClippingDlg->SetAction( myClippingAction );
+ }
- if ( !myClippingDlg->isVisible() )
- myClippingDlg->show();
- }
+ if ( !myClippingDlg->isVisible() )
+ myClippingDlg->show();
+ }
else
- {
- if ( myClippingDlg->isVisible() )
- myClippingDlg->hide();
- setCuttingPlane(false);
- }
+ {
+ if ( myClippingDlg->isVisible() )
+ myClippingDlg->hide();
+ aParent->setCuttingPlane(false);
+ }
}
/*!
return;
myViewPort->setBackgroundColor(theColor);
}
+
#include "OCCViewer.h"
#include "SUIT_ViewWindow.h"
#include <gp_Pnt.hxx>
+#include <V3d_Plane.hxx>
class QtxRectRubberBand;
class SUIT_Desktop;
virtual QColor backgroundColor() const;
virtual void setBackgroundColor( const QColor& );
+
public slots:
virtual void onFrontView();
virtual void onViewFitAll();
MapOfTransformStatus myStatus;
Mode2dType my2dMode;
+
+ Handle(V3d_Plane) myReserveClippingPlane;
};
#ifdef WIN32