From b8e2a0caada80834dd418eccad49b15519b94354 Mon Sep 17 00:00:00 2001 From: imn Date: Fri, 8 Aug 2014 16:05:35 +0400 Subject: [PATCH] Remove obsolete OCC_VERSION_LARGE defines. --- src/CAF/CAF_Study.cxx | 29 ----------- src/DDS/DDS_Dictionary.cxx | 4 -- src/LightApp/LightApp_Application.cxx | 18 +++---- src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx | 2 - src/OCCViewer/OCCViewer_CubeAxesDlg.cxx | 2 - src/OCCViewer/OCCViewer_ViewModel.cxx | 32 ------------ src/OCCViewer/OCCViewer_ViewModel.h | 8 --- src/OCCViewer/OCCViewer_ViewPort3d.cxx | 51 ------------------- src/OCCViewer/OCCViewer_ViewWindow.cxx | 14 ----- src/SOCC/SOCC_ViewModel.cxx | 49 +----------------- src/SalomeApp/SalomeApp_ExceptionHandler.cxx | 17 ++----- src/Session/SALOME_Session_Server.cxx | 13 ----- 12 files changed, 12 insertions(+), 227 deletions(-) diff --git a/src/CAF/CAF_Study.cxx b/src/CAF/CAF_Study.cxx index d8cfa68b4..0b60a95fd 100755 --- a/src/CAF/CAF_Study.cxx +++ b/src/CAF/CAF_Study.cxx @@ -108,9 +108,7 @@ bool CAF_Study::createDocument( const QString& doc ) if ( res && app && !app->stdApp().IsNull() ) { try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif TColStd_SequenceOfExtendedString formats; app->stdApp()->Formats( formats ); if ( !formats.IsEmpty() ) @@ -149,15 +147,8 @@ bool CAF_Study::openDocument( const QString& fname ) bool status = false; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == PCDM_RS_OK; -#else - status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == CDF_RS_OK; -#endif } catch ( Standard_Failure ) { status = false; @@ -185,15 +176,9 @@ bool CAF_Study::saveDocumentAs( const QString& fname ) bool status = false; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif if ( save ) -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version status = app->Save( stdDoc() ) == PCDM_SS_OK; -#else - status = app->Save( stdDoc() ) == CDF_SS_OK; -#endif else { TCollection_ExtendedString format, path( CAF_Tools::toExtString( fname ) ); @@ -202,11 +187,7 @@ bool CAF_Study::saveDocumentAs( const QString& fname ) if ( format.Length() ) stdDoc()->ChangeStorageFormat( format ); -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version status = app->SaveAs( stdDoc(), path ) == PCDM_SS_OK; -#else - status = app->SaveAs( stdDoc(), path ) == CDF_SS_OK; -#endif } } catch ( Standard_Failure ) { @@ -233,9 +214,7 @@ bool CAF_Study::openTransaction() bool res = true; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif if ( myStdDoc->HasOpenCommand() ) myStdDoc->AbortCommand(); @@ -259,9 +238,7 @@ bool CAF_Study::abortTransaction() bool res = true; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif myStdDoc->AbortCommand(); update(); } @@ -282,9 +259,7 @@ bool CAF_Study::commitTransaction( const QString& name ) bool res = true; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif myStdDoc->CommitCommand(); if ( canUndo() ) @@ -387,9 +362,7 @@ bool CAF_Study::undo() return false; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif myStdDoc->Undo(); undoModified(); /* decrement modification counter */ } @@ -411,9 +384,7 @@ bool CAF_Study::redo() return false; try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif myStdDoc->Redo(); doModified(); /* increment modification counter */ } diff --git a/src/DDS/DDS_Dictionary.cxx b/src/DDS/DDS_Dictionary.cxx index 6c99b7725..823bfe1a8 100644 --- a/src/DDS/DDS_Dictionary.cxx +++ b/src/DDS/DDS_Dictionary.cxx @@ -555,9 +555,7 @@ Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard if ( theUnits && *theUnits && strcmp( theUnits, "%" ) ) { try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif aRetValue = UnitsAPI::AnyToSI( theValue, theUnits ); } catch( Standard_Failure ) { @@ -582,9 +580,7 @@ Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standa if ( theUnits && *theUnits && strcmp( theUnits, "%" ) ) { try { -#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; -#endif aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits ); } catch( Standard_Failure ) { diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index edc93ceda..53b251f4a 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -2152,16 +2152,14 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->setItemProperty( "strings", aValuesList, vtkStyleMode ); pref->setItemProperty( "indexes", anIndicesList, vtkStyleMode ); // ... -> zooming mode - #if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version - int occZoomingStyleMode = pref->addPreference( tr( "PREF_ZOOMING" ), Viewer3DGroup, - LightApp_Preferences::Selector, "3DViewer", "zooming_mode" ); - aValuesList.clear(); - anIndicesList.clear(); - aValuesList << tr("PREF_ZOOMING_AT_CENTER") << tr("PREF_ZOOMING_AT_CURSOR"); - anIndicesList << 0 << 1; - pref->setItemProperty( "strings", aValuesList, occZoomingStyleMode ); - pref->setItemProperty( "indexes", anIndicesList, occZoomingStyleMode ); - #endif + int occZoomingStyleMode = pref->addPreference( tr( "PREF_ZOOMING" ), Viewer3DGroup, + LightApp_Preferences::Selector, "3DViewer", "zooming_mode" ); + aValuesList.clear(); + anIndicesList.clear(); + aValuesList << tr("PREF_ZOOMING_AT_CENTER") << tr("PREF_ZOOMING_AT_CURSOR"); + anIndicesList << 0 << 1; + pref->setItemProperty( "strings", aValuesList, occZoomingStyleMode ); + pref->setItemProperty( "indexes", anIndicesList, occZoomingStyleMode ); // ... "Trihedron" group <> int occTriGroup = pref->addPreference( tr( "PREF_TRIHEDRON" ), Viewer3DGroup ); pref->setItemProperty( "columns", 2, occTriGroup ); diff --git a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx index 1cabc85f0..9b60f4546 100644 --- a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx +++ b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx @@ -108,10 +108,8 @@ Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFind(const Handle(SALOME_In return ChangeFind(K); } -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version Standard_EXPORT Standard_Address Find1 (const Handle(SALOME_InteractiveObject)& K) const; Standard_EXPORT Standard_Address ChangeFind1 (const Handle(SALOME_InteractiveObject)& K); -#endif private: Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& Other); diff --git a/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx b/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx index 86cade97c..31561c3a5 100644 --- a/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx +++ b/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx @@ -244,7 +244,6 @@ void OCCViewer_CubeAxesDlg::SetData( bool theIsVisible, OCCViewer_AxisWidget::Ax */ void OCCViewer_CubeAxesDlg::ApplyData( const Handle(V3d_View)& theView ) { -#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version if( theView.IsNull() ) return; @@ -317,5 +316,4 @@ void OCCViewer_CubeAxesDlg::ApplyData( const Handle(V3d_View)& theView ) theView->GraduatedTrihedronErase(); theView->Redraw(); -#endif } diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 5aff3c60d..e55694dc8 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -66,10 +66,6 @@ #include - -// VSR: Uncomment below line to allow texture background support in OCC viewer -#define OCC_ENABLE_TEXTURED_BACKGROUND - /*! Get data for supported background modes: gradient types, identifiers and supported image formats */ @@ -83,11 +79,7 @@ QString OCCViewer_Viewer::backgroundData( QStringList& gradList, QIntList& idLis Diagonal1Gradient << Diagonal2Gradient << Corner1Gradient << Corner2Gradient << Corner3Gradient << Corner4Gradient; -#if OCC_VERSION_LARGE > 0x06050200 // enabled since OCCT 6.5.3, since in previous version this functionality is buggy -#ifdef OCC_ENABLE_TEXTURED_BACKGROUND txtList << Qtx::CenterTexture << Qtx::TileTexture << Qtx::StretchTexture; -#endif -#endif return tr("BG_IMAGE_FILES"); } @@ -108,18 +100,8 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron) //myV3dViewer->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267) myV3dViewer->SetDefaultLights(); -#if OCC_VERSION_LARGE <= 0x06060000 // Porting to OCCT higher 6.6.0 version - myV3dCollector = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Collector3d").ToExtString() ); - //myV3dCollector->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267) - myV3dCollector->SetDefaultLights(); -#endif - // init selector -#if OCC_VERSION_LARGE <= 0x06060000 - myAISContext = new AIS_InteractiveContext( myV3dViewer, myV3dCollector ); -#else myAISContext = new AIS_InteractiveContext( myV3dViewer ); -#endif myAISContext->SelectionColor( Quantity_NOC_WHITE ); // display isoline on planar faces (box for ex.) @@ -166,9 +148,6 @@ OCCViewer_Viewer::~OCCViewer_Viewer() { myAISContext.Nullify(); myV3dViewer.Nullify(); -#if OCC_VERSION_LARGE <= 0x06060000 - myV3dCollector.Nullify(); -#endif } /*! @@ -415,10 +394,8 @@ void OCCViewer_Viewer::onViewMapped(OCCViewer_ViewPort3d* viewPort) int OCCViewer_Viewer::getTopLayerId() { -#if OCC_VERSION_LARGE > 0x06050200 if ( myTopLayerId == 0 && !myAISContext->CurrentViewer().IsNull() ) myAISContext->CurrentViewer()->AddZLayer( myTopLayerId ); -#endif return myTopLayerId; } @@ -731,15 +708,6 @@ bool OCCViewer_Viewer::isInViewer( const Handle(AIS_InteractiveObject)& obj, AIS_ListOfInteractive List; myAISContext->DisplayedObjects(List); -#if OCC_VERSION_LARGE <= 0x06060000 - if( !onlyInViewer ) - { - AIS_ListOfInteractive List1; - myAISContext->ObjectsInCollector(List1); - List.Append(List1); - } -#endif - AIS_ListIteratorOfListOfInteractive ite(List); for ( ; ite.More(); ite.Next() ) if( ite.Value()==obj ) diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index d29df5315..5ca95ef26 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -126,9 +126,6 @@ public: public: Handle(V3d_Viewer) getViewer3d() const { return myV3dViewer;} -#if OCC_VERSION_LARGE <= 0x06060000 - Handle(V3d_Viewer) getCollector3d() const { return myV3dCollector; } -#endif Handle(AIS_InteractiveContext) getAISContext() const { return myAISContext; } Handle(AIS_Trihedron) getTrihedron() const { return myTrihedron; } @@ -197,11 +194,6 @@ protected slots: protected: Handle(V3d_Viewer) myV3dViewer; -#if OCC_VERSION_LARGE <= 0x06060000 - Handle(V3d_Viewer) myV3dCollector; -#endif - - Handle(AIS_Trihedron) myTrihedron; Handle(AIS_InteractiveContext) myAISContext; diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 110076d13..b0df1877e 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -313,22 +313,6 @@ void OCCViewer_ViewPort3d::updateBackground() if ( activeView().IsNull() ) return; if ( !myBackground.isValid() ) return; - // VSR: Important note on below code. - // In OCCT (in version 6.5.2), things about the background drawing - // are not straightforward and not clearly understandable: - // - Horizontal gradient is drawn vertically (!), well ok, from top side to bottom one. - // - Vertical gradient is drawn horizontally (!), from right side to left one (!!!). - // - First and second diagonal gradients are confused. - // - Image texture, once set, can not be removed (!). - // - Texture image fill mode Aspect_FM_NONE is not taken into account (and means the same - // as Aspect_FM_CENTERED). - // - The only way to cancel gradient background (and get back to single colored) is to - // set gradient background style to Aspect_GFM_NONE while passing two colors is also needed - // (see V3d_View::SetBgGradientColors() function). - // - Also, it is impossible to draw texture image above the gradiented background (only above - // single-colored). - // In OCCT 6.5.3 all above mentioned problems are fixed; so, above comment should be removed as soon - // as SALOME is migrated to OCCT 6.5.3. The same concerns #ifdef statements in the below code switch ( myBackground.mode() ) { case Qtx::ColorBackground: { @@ -337,13 +321,8 @@ void OCCViewer_ViewPort3d::updateBackground() // Unset texture should be done here // ... Quantity_Color qCol( c.red()/255., c.green()/255., c.blue()/255., Quantity_TOC_RGB ); -#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3 activeView()->SetBgGradientStyle( Aspect_GFM_NONE ); // cancel gradient background activeView()->SetBgImageStyle( Aspect_FM_NONE ); // cancel texture background -#else - // cancel gradient background (in OCC before v6.5.3 the only way to do this is to set it to NONE type passing arbitrary colors as parameters) - activeView()->SetBgGradientColors( qCol, qCol, Aspect_GFM_NONE ); -#endif // then change background color activeView()->SetBackgroundColor( qCol ); // update viewer @@ -365,38 +344,16 @@ void OCCViewer_ViewPort3d::updateBackground() activeView()->SetBgImageStyle( Aspect_FM_NONE ); // cancel texture background switch ( type ) { case OCCViewer_Viewer::HorizontalGradient: -#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3 activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True ); -#else - // in OCCT before v6.5.3, to draw horizontal gradient it's necessary to use Aspect_GFM_VER type - // and interchange the colors - activeView()->SetBgGradientColors( qCol2, qCol1, Aspect_GFM_VER, Standard_True ); -#endif break; case OCCViewer_Viewer::VerticalGradient: -#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3 activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_VER, Standard_True ); -#else - // in OCCT before v6.5.3, to draw vertical gradient it's necessary to use Aspect_GFM_HOR type - activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True ); -#endif break; case OCCViewer_Viewer::Diagonal1Gradient: -#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3 activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True ); -#else - // in OCCT before v6.5.3, to draw 1st dialognal gradient it's necessary to use Aspect_GFM_DIAG2 type - // and interchange the colors - activeView()->SetBgGradientColors( qCol2, qCol1, Aspect_GFM_DIAG2, Standard_True ); -#endif break; case OCCViewer_Viewer::Diagonal2Gradient: -#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3 activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG2, Standard_True ); -#else - // in OCCT before v6.5.3, to draw 2nd dialognal gradient it's necessary to use Aspect_GFM_DIAG1 type - activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True ); -#endif break; case OCCViewer_Viewer::Corner1Gradient: activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER1, Standard_True ); @@ -424,9 +381,6 @@ void OCCViewer_ViewPort3d::updateBackground() default: break; } -#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3 - // VSR: In OCCT before v6.5.3 below code can't be used because of very ugly bug - it has been impossible to - // clear the background texture image as soon as it was once set to the viewer. if ( myBackground.isTextureShown() ) { QString fileName; int textureMode = myBackground.texture( fileName ); @@ -449,7 +403,6 @@ void OCCViewer_ViewPort3d::updateBackground() activeView()->Update(); } } -#endif } /*! @@ -477,10 +430,8 @@ void OCCViewer_ViewPort3d::fitRect( const QRect& rect ) */ void OCCViewer_ViewPort3d::startZoomAtPoint( int x, int y ) { -#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version if ( !activeView().IsNull() && isAdvancedZoomingEnabled() ) activeView()->StartZoomAtPoint( x, y ); -#endif } /*! @@ -492,11 +443,9 @@ void OCCViewer_ViewPort3d::zoom( int x0, int y0, int x, int y ) // as OCCT respects a sign of only dx, // but we want both signes to be taken into account //activeView()->Zoom( x0, y0, x, y ); -#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version if ( isAdvancedZoomingEnabled() ) activeView()->ZoomAtPoint( x0, y0, x, y ); else -#endif activeView()->Zoom( x0 + y0, 0, x + y, 0 ); emit vpTransformed( this ); } diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index d8002d637..4f38b4110 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -83,12 +83,9 @@ #include #include -#if OCC_VERSION_LARGE > 0x06060000 #include #include -#endif - #include #include @@ -1391,9 +1388,7 @@ void OCCViewer_ViewWindow::createToolBar() } toolMgr()->append( DumpId, tid ); toolMgr()->append( SwitchInteractionStyleId, tid ); -#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version toolMgr()->append( SwitchZoomingStyleId, tid ); -#endif toolMgr()->append( SwitchPreselectionId, tid ); toolMgr()->append( SwitchSelectionId, tid ); if( myModel->trihedronActivated() ) @@ -1440,9 +1435,7 @@ void OCCViewer_ViewWindow::createToolBar() toolMgr()->append( toolMgr()->separator(), tid ); toolMgr()->append( ClippingId, tid ); toolMgr()->append( AxialScaleId, tid ); -#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version toolMgr()->append( GraduatedAxesId, tid ); -#endif toolMgr()->append( AmbientId, tid ); toolMgr()->append( MaximizedId, tid ); @@ -1729,7 +1722,6 @@ void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem, bool base myModel->setTrihedronShown( anItem.isVisible ); myModel->setTrihedronSize( anItem.size ); -#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version // graduated trihedron bool anIsVisible = anItem.gtIsVisible; OCCViewer_AxisWidget::AxisData anAxisData[3]; @@ -1775,7 +1767,6 @@ void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem, bool base myCubeAxesDlg->SetData( anIsVisible, anAxisData ); myCubeAxesDlg->ApplyData( aView3d ); -#endif } // if ( !baseParamsOnly ) @@ -2115,7 +2106,6 @@ viewAspect OCCViewer_ViewWindow::getViewParams() const aView3d->Center( params.centerX, params.centerY ); #endif -#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version // graduated trihedron bool anIsVisible = false; OCCViewer_AxisWidget::AxisData anAxisData[3]; @@ -2161,7 +2151,6 @@ viewAspect OCCViewer_ViewWindow::getViewParams() const params.gtTickmarkLengthX = anAxisData[0].TickmarkLength; params.gtTickmarkLengthY = anAxisData[1].TickmarkLength; params.gtTickmarkLengthZ = anAxisData[2].TickmarkLength; -#endif return params; } @@ -2238,8 +2227,6 @@ QString OCCViewer_ViewWindow::getVisualParameters() data << ClippingPlane; } - -#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 or newer version // graduated trihedron data << QString( "gtIsVisible=%1" ) .arg( params.gtIsVisible ); data << QString( "gtDrawNameX=%1" ) .arg( params.gtDrawNameX ); @@ -2281,7 +2268,6 @@ QString OCCViewer_ViewWindow::getVisualParameters() data << QString( "gtTickmarkLengthX=%1" ).arg( params.gtTickmarkLengthX ); data << QString( "gtTickmarkLengthY=%1" ).arg( params.gtTickmarkLengthY ); data << QString( "gtTickmarkLengthZ=%1" ).arg( params.gtTickmarkLengthZ ); -#endif QString bg = Qtx::backgroundToString( background() ).replace( "=", "$" ); data << QString( "background=%1" ).arg( bg ); diff --git a/src/SOCC/SOCC_ViewModel.cxx b/src/SOCC/SOCC_ViewModel.cxx index 25fdb6547..985d1fed7 100755 --- a/src/SOCC/SOCC_ViewModel.cxx +++ b/src/SOCC/SOCC_ViewModel.cxx @@ -158,16 +158,6 @@ bool SOCC_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& obj, { AIS_ListOfInteractive List; getAISContext()->DisplayedObjects(List); - -#if OCC_VERSION_LARGE <= 0x06060000 - if( !onlyInViewer ) { - AIS_ListOfInteractive List1; - getAISContext()->ObjectsInCollector(List1); - List.Append(List1); -} -#endif - - AIS_ListIteratorOfListOfInteractive ite(List); for ( ; ite.More(); ite.Next() ) { @@ -362,29 +352,6 @@ void SOCC_Viewer::Display( const SALOME_OCCPrs* prs ) continue; } -#if OCC_VERSION_LARGE <= 0x06060000 - // then try to find presentation in the collector - if(ic->IsInCollector(anAIS)) - { - ic->DisplayFromCollector( anAIS, false ); - // Deactivate object if necessary - if ( !anOCCPrs->ToActivate() ) - ic->Deactivate( anAIS ); - - // Set visibility flag - // Temporarily commented to avoid awful dependecy on SALOMEDS - // TODO: better mechanism of storing display/erse status in a study - // should be provided... - //Handle(SALOME_InteractiveObject) anObj = - // Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() ); - //if ( !anObj.IsNull() && anObj->hasEntry() ) - //{ - // if ( study ) - // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this ); - //} - continue; - } -#endif // if object is not displayed and not found in the collector - display it if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) ) { @@ -400,14 +367,12 @@ void SOCC_Viewer::Display( const SALOME_OCCPrs* prs ) { aSh->SetClippable (prs->IsClippable()); applyExistingClipPlanesToObject (anAIS); -#if OCC_VERSION_LARGE > 0x06050200 bool top = (aSh->isTopLevel() && aSh->switchTopLevel()); ic->SetZLayer( aSh, top ? getTopLayerId() : 0 ); if(!aSh->toActivate()) { ic->Deactivate( aSh ); } -#endif } //Register anAIS (if it has an entry) in entry2aisobjects map @@ -481,11 +446,7 @@ void SOCC_Viewer::Erase( const SALOME_OCCPrs* prs, const bool forced ) Handle(AIS_InteractiveObject) anAIS = aIter.Value(); if ( !anAIS.IsNull() ) { // erase the object from context : move it to collector -#if OCC_VERSION_LARGE <= 0x06060000 - ic->Erase( anAIS, false, forced ? false : true ); -#else ic->Erase( anAIS, false ); -#endif // Set visibility flag if necessary // Temporarily commented to avoid awful dependecy on SALOMEDS // TODO: better mechanism of storing display/erse status in a study @@ -535,11 +496,7 @@ void SOCC_Viewer::EraseAll( const bool forced ) // erase an object Handle(AIS_InteractiveObject) anIO = anIter.Value(); -#if OCC_VERSION_LARGE <= 0x06060000 - ic->Erase( anIO, false, forced ? false : true ); -#else ic->Erase( anIO, false ); -#endif // Set visibility flag if necessary // Temporarily commented to avoid awful dependecy on SALOMEDS @@ -579,11 +536,7 @@ SALOME_Prs* SOCC_Viewer::CreatePrs( const char* entry ) for ( unsigned int ind = 0; ind < List.size(); ind++ ) { Handle(AIS_InteractiveObject) anAIS=List[ind]; - if(ic->IsDisplayed(anAIS) -#if OCC_VERSION_LARGE <= 0x06060000 - || ic->IsInCollector(anAIS) -#endif - ) + if(ic->IsDisplayed(anAIS)) { prs->AddObject( anAIS ); } diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index d23eb4b04..6c2184022 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -33,12 +33,9 @@ #include -#if OCC_VERSION_LARGE > 0x06010000 - #include - #include -#else - #include "CASCatch.hxx" -#endif +#include +#include + /*!Constructor. Initialize by \a floatSignal.*/ SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal ) @@ -57,19 +54,11 @@ SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal ) /*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/ bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e ) { -#if OCC_VERSION_LARGE > 0x06010000 try { OCC_CATCH_SIGNALS; -#else - CASCatch_TRY { -#endif SUIT_ExceptionHandler::internalHandle( o, e ); } -#if OCC_VERSION_LARGE > 0x06010000 catch(Standard_Failure) { -#else - CASCatch_CATCH(Standard_Failure) { -#endif Handle(Standard_Failure) aFail = Standard_Failure::Caught(); throw Standard_Failure( aFail->GetMessageString() ); } diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 46030c538..65284c93d 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -259,19 +259,6 @@ public: virtual bool notify( QObject* receiver, QEvent* e ) { -#if OCC_VERSION_LARGE < 0x06010100 - // Disable GUI user actions while python command is executed - if (SUIT_Session::IsPythonExecuted()) { - // Disable mouse and keyboard events - QEvent::Type aType = e->type(); - if (aType == QEvent::MouseButtonPress || aType == QEvent::MouseButtonRelease || - aType == QEvent::MouseButtonDblClick || aType == QEvent::MouseMove || - aType == QEvent::Wheel || aType == QEvent::ContextMenu || - aType == QEvent::KeyPress || aType == QEvent::KeyRelease || - aType == QEvent::Accel || aType == QEvent::AccelOverride) - return false; - } -#endif #ifdef ENABLE_TESTRECORDER return myHandler ? myHandler->handle( receiver, e ) : -- 2.39.2