mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
#4047 Alter mouse cursor in Vec3dPickEventHandler
This commit is contained in:
parent
d20c0fc004
commit
4e17b5acfa
@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RicVec3dPickEventHandler.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "Rim3dView.h"
|
||||
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
@ -52,9 +53,19 @@ bool RicVec3dPickEventHandler::handle3dPickEvent(const Ric3dPickEvent& eventObje
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicVec3dPickEventHandler::registerAsPickEventHandler()
|
||||
{
|
||||
Ric3dViewPickEventHandler::registerAsPickEventHandler();
|
||||
RiaApplication::instance()->setOverrideCursor(Qt::CrossCursor);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicVec3dPickEventHandler::notifyUnregistered()
|
||||
{
|
||||
RiaApplication::instance()->restoreOverrideCursor();
|
||||
}
|
||||
|
@ -31,6 +31,9 @@ class RicVec3dPickEventHandler : public Ric3dViewPickEventHandler
|
||||
public:
|
||||
RicVec3dPickEventHandler(const caf::PdmObjectHandle* handlingObject, caf::PdmField<cvf::Vec3d>* vectorField);
|
||||
bool handle3dPickEvent(const Ric3dPickEvent& eventObject) override;
|
||||
|
||||
|
||||
void registerAsPickEventHandler() override;
|
||||
void notifyUnregistered() override;
|
||||
|
||||
private:
|
||||
|
@ -88,6 +88,17 @@ QWidget* PdmUiVec3dEditor::createLabelWidget(QWidget* parent)
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmUiVec3dEditor::~PdmUiVec3dEditor()
|
||||
{
|
||||
if (pickEventHandler())
|
||||
{
|
||||
pickEventHandler()->unregisterAsPickEventHandler();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -73,7 +73,7 @@ class PdmUiVec3dEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiVec3dEditor() {}
|
||||
~PdmUiVec3dEditor() override {}
|
||||
~PdmUiVec3dEditor() override;
|
||||
|
||||
protected:
|
||||
QWidget* createEditorWidget(QWidget* parent) override;
|
||||
|
Loading…
Reference in New Issue
Block a user