refs #736: fix displaying of ghost of polyline section in addition mode.

This commit is contained in:
mkr 2015-11-25 18:43:47 +03:00
parent 610bd3aff0
commit 5488595c45

View File

@ -1005,10 +1005,18 @@ void CurveCreator_Widget::onMousePress( SUIT_ViewWindow*, QMouseEvent* theEvent
*/ */
void CurveCreator_Widget::onMouseRelease( SUIT_ViewWindow* theWindow, QMouseEvent* theEvent ) void CurveCreator_Widget::onMouseRelease( SUIT_ViewWindow* theWindow, QMouseEvent* theEvent )
{ {
if ( getActionMode() != ModificationMode ) ActionMode aMode = getActionMode();
if ( aMode != ModificationMode )
{ {
// Emit selectionChanged() signal // Emit selectionChanged() signal
getOCCViewer()->performSelectionChanged(); getOCCViewer()->performSelectionChanged();
if ( aMode == AdditionMode )
{
Handle(AIS_InteractiveContext) aCtx = getAISContext();
if ( !aCtx.IsNull() )
aCtx->ClearSelected();
}
return; return;
} }
if (theEvent->button() != Qt::LeftButton) return; if (theEvent->button() != Qt::LeftButton) return;