From 04858cf024cef74b9112bf3e9623087288908902 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 8 Nov 2012 10:25:59 +0000 Subject: [PATCH] Backward compatibility with OCCT 6.5.3 --- src/EntityGUI/EntityGUI_3DSketcherDlg.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx index e7e6182d6..8be419d38 100755 --- a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx @@ -26,7 +26,8 @@ #include "EntityGUI_3DSketcherDlg.h" #include "EntityGUI_Widgets.h" -#include + +#include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include #include @@ -65,15 +67,15 @@ #include #include #include +#if OCC_VERSION_LARGE > 0x06050300 #include #include #include - #include #include #include - #include +#endif // OCC_VERSION_LARGE > 0x06050300 // This include must be *AFTER* SOCC_ViewModel.h because // of the constant ROTATE which is a #define in @@ -101,6 +103,7 @@ private: bool& myLock; }; +#if OCC_VERSION_LARGE > 0x06050300 DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject) class AIS_Text:public AIS_InteractiveObject @@ -194,6 +197,7 @@ void AIS_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentation asp->Aspect()->SetTextFontAspect(aFontAspect); Prs3d_Text::Draw(aPresentation, asp, aText, aPosition); }; +#endif // OCC_VERSION_LARGE > 0x06050300 bool isSame (double d1, double d2) { @@ -325,7 +329,9 @@ void EntityGUI_3DSketcherDlg::Init() SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); myAnglePrs = dynamic_cast(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0)); myLengthPrs = dynamic_cast(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0)); +#if OCC_VERSION_LARGE > 0x06050300 myTextPrs = dynamic_cast(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0)); +#endif // OCC_VERSION_LARGE > 0x06050300 localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX); @@ -1588,6 +1594,7 @@ void EntityGUI_3DSketcherDlg::displayText ( std::string theText, gp_Pnt P, bool store ) { +#if OCC_VERSION_LARGE > 0x06050300 SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); Handle(AIS_Text) anIO = new AIS_Text(TCollection_ExtendedString(theText.c_str()), P); @@ -1611,6 +1618,7 @@ void EntityGUI_3DSketcherDlg::displayText ( std::string theText, GEOMBase_Helper::displayPreview(aSPrs, true, true); } } +#endif // OCC_VERSION_LARGE > 0x06050300 } //================================================================ @@ -1851,4 +1859,4 @@ double EntityGUI_3DSketcherDlg::height (gp_Pnt thePnt) const gp_Pnt aPnt = thePnt.Transformed(aTrsf); return aPnt.Z(); -} \ No newline at end of file +} -- 2.39.2