From 6c1db481fc674c89202a1f50de54c7e5e430744f Mon Sep 17 00:00:00 2001 From: ana Date: Thu, 7 Apr 2016 12:17:35 +0300 Subject: [PATCH] Windows compatibility --- src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx | 6 +++--- src/Prs/CMakeLists.txt | 5 +++++ src/ViewerData/CMakeLists.txt | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx index c11065772..4a2bf6e1a 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx @@ -141,7 +141,7 @@ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePla Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext(); - if ( anAISContext->IsSelected( thePlane ) ) + if ( anAISContext->IsSelected( Handle(AIS_InteractiveObject)::DownCast(thePlane) ) ) { return false; } @@ -172,7 +172,7 @@ bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePla Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext(); - if ( !anAISContext->IsSelected( thePlane ) ) + if ( !anAISContext->IsSelected( Handle(AIS_InteractiveObject)::DownCast(thePlane) ) ) { return false; } @@ -522,7 +522,7 @@ bool OCCViewer_ClipPlaneInteractor::mousePress( QMouseEvent* theEvent, // process mouse click on the object if ( myIsClickable ) { - myViewer->getAISContext()->SetSelected( aPlane ); + myViewer->getAISContext()->SetSelected( Handle(AIS_InteractiveObject)::DownCast(aPlane) ); emit planeClicked( aPlane ); } diff --git a/src/Prs/CMakeLists.txt b/src/Prs/CMakeLists.txt index 236e6f4ee..d0a219cd5 100755 --- a/src/Prs/CMakeLists.txt +++ b/src/Prs/CMakeLists.txt @@ -22,6 +22,11 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ) +# libraries to link to +SET(_link_LIBRARIES ${CAS_KERNEL}) + ADD_LIBRARY(SalomePrs SALOME_Prs.cxx) +TARGET_LINK_LIBRARIES(SalomePrs ${_link_LIBRARIES}) + INSTALL(TARGETS SalomePrs EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) INSTALL(FILES SALOME_Prs.h DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/ViewerData/CMakeLists.txt b/src/ViewerData/CMakeLists.txt index b85fd610d..a959fcdb1 100644 --- a/src/ViewerData/CMakeLists.txt +++ b/src/ViewerData/CMakeLists.txt @@ -28,7 +28,7 @@ INCLUDE_DIRECTORIES( ADD_DEFINITIONS(${CAS_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d}) +SET(_link_LIBRARIES ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_VIEWER}) # --- headers --- -- 2.39.2