From ce8ed2ade3f628300ca670c2928fb16ceca6200c Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 9 Jan 2015 18:39:21 -0200 Subject: [PATCH] Path: Enabling highlight/selection colors in paths --- src/Mod/Path/Gui/CMakeLists.txt | 1 + src/Mod/Path/Gui/PreCompiled.h | 2 ++ src/Mod/Path/Gui/ViewProviderPath.cpp | 3 ++- src/Mod/Path/Gui/ViewProviderPath.h | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/Gui/CMakeLists.txt b/src/Mod/Path/Gui/CMakeLists.txt index a5f2ae10df..d6d572330f 100644 --- a/src/Mod/Path/Gui/CMakeLists.txt +++ b/src/Mod/Path/Gui/CMakeLists.txt @@ -22,6 +22,7 @@ link_directories(${OCC_LIBRARY_DIR}) set(PathGui_LIBS Path + PartGui FreeCADGui ) diff --git a/src/Mod/Path/Gui/PreCompiled.h b/src/Mod/Path/Gui/PreCompiled.h index 5b5232312b..23662865ca 100644 --- a/src/Mod/Path/Gui/PreCompiled.h +++ b/src/Mod/Path/Gui/PreCompiled.h @@ -29,10 +29,12 @@ #ifdef FC_OS_WIN32 # define PartExport __declspec(dllimport) # define PathExport __declspec(dllimport) +# define PartGuiExport __declspec(dllexport) # define PathGuiExport __declspec(dllexport) #else // for Linux # define PartExport # define PathExport +# define PartGuiExport # define PathGuiExport #endif diff --git a/src/Mod/Path/Gui/ViewProviderPath.cpp b/src/Mod/Path/Gui/ViewProviderPath.cpp index 0d7260daff..96b2b9698f 100644 --- a/src/Mod/Path/Gui/ViewProviderPath.cpp +++ b/src/Mod/Path/Gui/ViewProviderPath.cpp @@ -64,6 +64,7 @@ using namespace Gui; using namespace PathGui; using namespace Path; +using namespace PartGui; PROPERTY_SOURCE(PathGui::ViewProviderPath, Gui::ViewProviderGeometryObject) @@ -104,7 +105,7 @@ ViewProviderPath::ViewProviderPath() pcDrawStyle->style = SoDrawStyle::LINES; pcDrawStyle->lineWidth = LineWidth.getValue(); - pcLines = new SoIndexedLineSet; + pcLines = new PartGui::SoBrepEdgeSet(); pcLines->ref(); pcLineColor = new SoMaterial; diff --git a/src/Mod/Path/Gui/ViewProviderPath.h b/src/Mod/Path/Gui/ViewProviderPath.h index e2ac4bf29c..443cb4b9ee 100644 --- a/src/Mod/Path/Gui/ViewProviderPath.h +++ b/src/Mod/Path/Gui/ViewProviderPath.h @@ -27,10 +27,10 @@ #include #include #include +#include class SoCoordinate3; class SoDrawStyle; -class SoIndexedLineSet; class SoMaterial; class SoBaseColor; class SoMaterialBinding; @@ -73,7 +73,7 @@ protected: SoCoordinate3 * pcLineCoords; SoCoordinate3 * pcMarkerCoords; SoDrawStyle * pcDrawStyle; - SoIndexedLineSet * pcLines; + PartGui::SoBrepEdgeSet * pcLines; SoMaterial * pcLineColor; SoBaseColor * pcMarkerColor; SoMaterialBinding * pcMatBind;