this, SLOT( onMouseRelease( SUIT_ViewWindow*, QMouseEvent* ) ) );
disconnect( aViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
+ disconnect( aViewManager, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
+ this, SLOT( onLastViewClosed( SUIT_ViewManager* ) ) );
// restore normal mode in the viewer
OCCViewer_Utilities::setViewer2DMode( myOCCViewer, OCCViewer_ViewWindow::No2dMode );
// all local contexts should be closed if the viewer is not more used
this, SLOT( onMouseRelease( SUIT_ViewWindow*, QMouseEvent* ) ) );
connect( aViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
+ connect( aViewManager, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
+ this, SLOT( onLastViewClosed( SUIT_ViewManager* ) ) );
OCCViewer_Utilities::setViewer2DMode( theViewer, OCCViewer_ViewWindow::XYPlane );
}
}
}
}
-//=================================================================================
-// function : CurveCreator_Widget::onMousePress()
-// purpose : Manage mouse press events in Modification mode
-//=================================================================================
+/**
+ * Manage mouse press events
+ * \param theWindow an owner of the signal
+ * \param theEvent a mouse event
+ */
void CurveCreator_Widget::onMousePress( SUIT_ViewWindow*, QMouseEvent* theEvent )
{
if ( theEvent->button() != Qt::LeftButton )
}
}
-//=================================================================================
-// function : HYDROGUI_PolylineOp::onMouseRelease()
-// purpose : Manage mouse press events in Modification mode
-//=================================================================================
+/**
+ * Manage mouse release events in Modification mode
+ * \param theWindow an owner of the signal
+ * \param theEvent a mouse event
+ */
void CurveCreator_Widget::onMouseRelease( SUIT_ViewWindow*, QMouseEvent* theEvent )
{
if ( getActionMode() != ModificationMode )
updateLocalPointView();
}
-//=================================================================================
-// function : GeometryGUI::onMouseMove()
-// purpose : Manage mouse move events in Modification mode
-//=================================================================================
+/**
+ * Manage mouse move events in Modification mode
+ * \param theWindow an owner of the signal
+ * \param theEvent a mouse event
+ */
void CurveCreator_Widget::onMouseMove( SUIT_ViewWindow*, QMouseEvent* theEvent )
{
if ( getActionMode() != ModificationMode || !myDragStarted )
myDragStartPosition = aPos;
}
+/**
+ * Set zero viewer by the last view closed in
+ * \param theManager a viewer manager
+ */
+void CurveCreator_Widget::onLastViewClosed( SUIT_ViewManager* theManager )
+{
+ myOCCViewer = 0;
+}
+
void CurveCreator_Widget::onCellChanged( int theRow, int theColumn )
{
int aCurrSect = getSectionId( theRow );
void setOCCViewer( OCCViewer_Viewer* theViewer );
OCCViewer_Viewer* getOCCViewer();
- //virtual bool eventFilter( QObject* theWatched, QEvent* theEvent );
-
//! Return unique section name
std::string getUniqSectionName(CurveCreator_ICurve* theCurve) const;
void onMousePress( SUIT_ViewWindow*, QMouseEvent* theEvent );
void onMouseRelease( SUIT_ViewWindow*, QMouseEvent* theEvent );
void onMouseMove( SUIT_ViewWindow*, QMouseEvent* theEvent );
+ void onLastViewClosed( SUIT_ViewManager* theManager );
void onCellChanged( int theRow, int theColumn );