From 4b03dbcea17b4706a4166b99880451701b0f8aef Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 17 Nov 2015 17:40:47 +0300 Subject: [PATCH] #1091 Validate is disabled when Create group 1. deactivate created extrusion sketch in the local sketch selection 2. avoid left of the cross over viewer after contour is closed. --- src/PartSet/PartSet_SketcherMgr.cpp | 15 +++++++++++---- src/PartSet/PartSet_WidgetSketchCreator.cpp | 10 ++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 81d1cf6c8..6e600764e 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -75,6 +75,7 @@ #include #include +#include //#define DEBUG_DO_NOT_BY_ENTER @@ -200,10 +201,13 @@ void PartSet_SketcherMgr::onEnterViewPort() #endif if (canChangeCursor(getCurrentOperation())) { + QCursor* aCurrentCursor = QApplication::overrideCursor(); + if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) { + QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); #ifdef DEBUG_CURSOR - qDebug("onEnterViewPort() : Qt::CrossCursor"); + qDebug("onEnterViewPort() : Qt::CrossCursor"); #endif - QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); + } } if (!isNestedCreateOperation(getCurrentOperation())) @@ -925,10 +929,13 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation) void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation) { if (canChangeCursor(theOperation) && myIsMouseOverWindow) { - QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); + QCursor* aCurrentCursor = QApplication::overrideCursor(); + if (!aCurrentCursor || aCurrentCursor->shape() != Qt::CrossCursor) { + QApplication::setOverrideCursor(QCursor(Qt::CrossCursor)); #ifdef DEBUG_CURSOR - qDebug("startNestedSketch() : Qt::CrossCursor"); + qDebug("startNestedSketch() : Qt::CrossCursor"); #endif + } } } diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 6bc043eb4..308dd965f 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -32,6 +33,8 @@ #include #include +#include + #include #include #include @@ -228,5 +231,12 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp) } } } + else { + // this is a workarount to display the feature results in the operation selection mode + // if this is absent, sketch point/line local selection is available on extrusion cut result + static Events_ID anUpdateEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED); + ModelAPI_EventCreator::get()->sendUpdated(feature(), anUpdateEvent); + updateObject(feature()); + } } } -- 2.30.2