diff --git a/geofeatureoperator.cpp b/geofeatureoperator.cpp index 8e53e269..147584fe 100644 --- a/geofeatureoperator.cpp +++ b/geofeatureoperator.cpp @@ -445,13 +445,16 @@ void GeoFeatureOperator::drawLine3D(SceneView *pSceneView, UGString dataName) // pSceneControl->GetSceneEditWnd()->SetUserAction(UGSceneUserAction::suaEdit,UGEditType3D::ET3D_PolyLine); // pSceneControl->GetSceneEditWnd()->SetUserAction(UGSceneUserAction::suaCreatePolyline); + pSceneControl->GetSceneEditWnd()->m_SceneWindow.m_n3DCursorShape = UG3DCursorShape::ecDrawPolyLine; +// qDebug()<<"*******************Cursor0:"<GetSceneEditWnd()->Get3DCursorShape(); +// qDebug()<<"*******************Cursor1:"<GetSceneEditWnd()->m_SceneWindow.Get3DCursorShape(); +// qDebug()<<"*******************Cursor2:"<GetSceneEditWnd()->m_SceneWindow.m_n3DCursorShape; pSceneView->isEditStateFlag = true; //显示对话框 emit pSceneView->showSettingFlightPointDialg(); -// qDebug()<<"*******************Cursor:"<GetSceneEditWnd()->Get3DCursorShape(); -// qDebug()<<"*******************Cursor:"<GetSceneEditWnd()->m_SceneWindow.m_n3DCursorShape; + // dv = NULL; lineLayer3D = NULL; diff --git a/sceneview.cpp b/sceneview.cpp index fe3af609..be123fb1 100644 --- a/sceneview.cpp +++ b/sceneview.cpp @@ -3,7 +3,7 @@ void UGSTDCALL Action3DChangedCallBack(UGlong pWnd, UGSceneUserAction oldAction,UGSceneUserAction newAction) { - qDebug()<<"****************oldAction:"<GetSceneEditWnd()->m_SceneWindow.Get3DCursorShape()) + + switch(CursorShape) { case UG3DCursorShape::ecBusy: { @@ -248,7 +253,7 @@ void SceneView::ReviseCursor(int SceneUserAction) case UG3DCursorShape::ecDrawPolyGon: case UG3DCursorShape::ecDrawPolyLine: { - setCursor(QCursor(QPixmap(":/Resources/cross.png"), 9, 9)); + setCursor(QCursor(Qt::CrossCursor)); break; } case UG3DCursorShape::ecDrawText: @@ -256,10 +261,19 @@ void SceneView::ReviseCursor(int SceneUserAction) setCursor(QCursor(Qt::IBeamCursor)); break; } + case UG3DCursorShape::ecAddPoint: + setCursor(QCursor(Qt::CrossCursor)); + break; + case UG3DCursorShape::ecMovePoint: + setCursor(QCursor(Qt::SizeAllCursor)); + break; + case UG3DCursorShape::ecMoveZPoint: + setCursor(QCursor(Qt::SizeVerCursor)); + break; default: break; } - */ + } void SceneView::paintEvent(QPaintEvent* event) @@ -341,7 +355,10 @@ void SceneView::mouseMoveEvent(QMouseEvent* event) { m_pSceneControl->OnMouseMove(getMouseOrKeyFlag(event), event->x(), event->y()); } - ReviseCursor(m_pSceneControl->GetSceneEditWnd()->GetUserAction()); +// qDebug()<<"******************UserAction:"<GetSceneEditWnd()->GetUserAction(); +// if(m_pSceneControl->GetSceneEditWnd()->GetUserAction()==108) +// qDebug()<<"*******************Cursor0:"<GetSceneEditWnd()->Get3DCursorShape(); + ReviseCursor(m_pSceneControl->GetSceneEditWnd()->Get3DCursorShape()); } void SceneView::resizeEvent(QResizeEvent* event)