54519: [TC-9.3.0]: SIGSEGV during exit if dimensions are editing

This commit is contained in:
rnv 2019-03-22 10:59:36 +03:00
parent 991d2a1931
commit 4558fc1b44
3 changed files with 14 additions and 8 deletions

View File

@ -132,12 +132,14 @@ void MeasureGUI_DimensionInteractor::Disable()
myIsEnabled = false;
// remove event filtering from viewer windows
QVector<SUIT_ViewWindow*> aViews = myVM->getViews();
QVector<SUIT_ViewWindow*>::iterator aViewIt = aViews.begin();
for ( ; aViewIt != aViews.end(); ++aViewIt )
{
DisconnectView( *aViewIt );
if (myVM) {
// remove event filtering from viewer windows
QVector<SUIT_ViewWindow*> aViews = myVM->getViews();
QVector<SUIT_ViewWindow*>::iterator aViewIt = aViews.begin();
for ( ; aViewIt != aViews.end(); ++aViewIt )
{
DisconnectView( *aViewIt );
}
}
}

View File

@ -29,6 +29,7 @@
#include <GeometryGUI.h>
#include <QObject>
#include <QPointer>
#include <SelectMgr_EntityOwner.hxx>
#include <NCollection_Sequence.hxx>
@ -165,7 +166,7 @@ private:
private:
GeometryGUI* myGeomGUI;
bool myIsEnabled;
OCCViewer_ViewManager* myVM;
QPointer<OCCViewer_ViewManager> myVM;
OCCViewer_Viewer* myViewer;
Operation myOperation;
bool myOperationStarted;

View File

@ -129,7 +129,7 @@ MeasureGUI_ManageDimensionsDlg::MeasureGUI_ManageDimensionsDlg( GeometryGUI* the
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( OnDeactivateThisDialog() ) );
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
myDimensionInteractor = new MeasureGUI_DimensionInteractor( theGUI, theParent ),
myDimensionInteractor = new MeasureGUI_DimensionInteractor( theGUI, this ),
SelectionIntoArgument( Selection_Object );
@ -245,6 +245,9 @@ void MeasureGUI_ManageDimensionsDlg::StartSelection( const Selection theSelectio
//=================================================================================
void MeasureGUI_ManageDimensionsDlg::StopSelection()
{
if( !myGeomGUI || !myGeomGUI->getApp() || !myGeomGUI->getApp()->selectionMgr() )
return;
if ( myCurrentSelection == Selection_Object )
{
/* ----------------------------------------------- *