From: vsr Date: Tue, 23 Nov 2010 16:14:38 +0000 (+0000) Subject: Merge from V5_1_5_BR 23/11/2010 X-Git-Tag: RELIQUAT_5x_15112010~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8eb1a55ea44b0b9d5bc2a05d87fe3a89e50041b5;p=modules%2Fgui.git Merge from V5_1_5_BR 23/11/2010 --- diff --git a/adm_local/cmake_files/FindCAS.cmake b/adm_local/cmake_files/FindCAS.cmake index 97e4835fb..a6f50a456 100644 --- a/adm_local/cmake_files/FindCAS.cmake +++ b/adm_local/cmake_files/FindCAS.cmake @@ -21,7 +21,7 @@ SET(CASROOT $ENV{CASROOT}) SET(OCC_VERSION_MAJOR 6) SET(OCC_VERSION_MINOR 3) -SET(OCC_VERSION_MAINTENANCE 0) +SET(OCC_VERSION_MAINTENANCE 10) SET(CAS_CPPFLAGS) SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DOCC_VERSION_MAJOR=${OCC_VERSION_MAJOR}) @@ -33,6 +33,10 @@ SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DHAVE_CONFIG_H) SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -DHAVE_LIMITS_H) SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -I${CASROOT}/inc) +IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) + SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -D_OCC64) +ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) + IF(NOT WINDOWS) FIND_LIBRARY(Xmu Xmu) IF(Xmu) diff --git a/doc/salome/gui/images/pref11.png b/doc/salome/gui/images/pref11.png index 43b6fad6f..a3af88c50 100755 Binary files a/doc/salome/gui/images/pref11.png and b/doc/salome/gui/images/pref11.png differ diff --git a/doc/salome/gui/images/pref12.png b/doc/salome/gui/images/pref12.png index bfbc61685..699d82ec1 100755 Binary files a/doc/salome/gui/images/pref12.png and b/doc/salome/gui/images/pref12.png differ diff --git a/doc/salome/gui/images/pref13.png b/doc/salome/gui/images/pref13.png index 56dd24a41..0bd100d80 100755 Binary files a/doc/salome/gui/images/pref13.png and b/doc/salome/gui/images/pref13.png differ diff --git a/doc/salome/gui/images/pref14.png b/doc/salome/gui/images/pref14.png index ec035a867..577c3ed87 100755 Binary files a/doc/salome/gui/images/pref14.png and b/doc/salome/gui/images/pref14.png differ diff --git a/doc/salome/gui/images/pref41.png b/doc/salome/gui/images/pref41.png index 73f62b29d..c4d943f7d 100644 Binary files a/doc/salome/gui/images/pref41.png and b/doc/salome/gui/images/pref41.png differ diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 51c2639d2..0380785c9 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -282,6 +282,7 @@ void Plot2d_ViewFrame::DisplayAll() updateCurve( clist.at( i ), false ); } myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! Removes all curves from the view @@ -291,6 +292,7 @@ void Plot2d_ViewFrame::EraseAll() myPlot->clear(); myPlot->getCurves().clear(); myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! Redraws viewframe contents @@ -315,6 +317,7 @@ void Plot2d_ViewFrame::Display( const Plot2d_Prs* prs ) setXGrid( myXGridMajorEnabled, myXGridMaxMajor, myXGridMinorEnabled, myXGridMaxMinor, true ); setYGrid( myYGridMajorEnabled, myYGridMaxMajor, myYGridMinorEnabled, myYGridMaxMinor, myY2GridMajorEnabled, myY2GridMaxMajor, myY2GridMinorEnabled, myY2GridMaxMinor, true ); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -328,6 +331,7 @@ void Plot2d_ViewFrame::Erase( const Plot2d_Prs* prs, const bool ) // erase all curves from presentation curveList aCurves = prs->getCurves(); eraseCurves( aCurves ); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e ) @@ -631,6 +635,7 @@ void Plot2d_ViewFrame::displayCurve( Plot2d_Curve* curve, bool update ) myPlot->updateYAxisIdentifiers(); if ( update ) myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -669,6 +674,7 @@ void Plot2d_ViewFrame::eraseCurve( Plot2d_Curve* curve, bool update ) if ( update ) myPlot->replot(); } + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -685,6 +691,7 @@ void Plot2d_ViewFrame::eraseCurves( const curveList& curves, bool update ) // fitAll(); if ( update ) myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -695,7 +702,7 @@ void Plot2d_ViewFrame::updateCurve( Plot2d_Curve* curve, bool update ) if ( !curve ) return; if ( hasPlotCurve( curve ) ) { - QwtPlotCurve* aPCurve = getPlotCurve( curve ); + QwtPlotCurve* aPCurve = getPlotCurve( curve ); if ( !curve->isAutoAssign() ) { Qt::PenStyle ps = Plot2d::plot2qwtLine( curve->getLine() ); QwtSymbol::Style ms = Plot2d::plot2qwtMarker( curve->getMarker() ); @@ -710,6 +717,7 @@ void Plot2d_ViewFrame::updateCurve( Plot2d_Curve* curve, bool update ) aPCurve->setVisible( true ); if ( update ) myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } } @@ -790,6 +798,7 @@ void Plot2d_ViewFrame::fitAll() myPlot->setAxisScale( QwtPlot::yRight, y2min, y2max ); } myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -817,6 +826,7 @@ void Plot2d_ViewFrame::fitArea( const QRect& area ) myPlot->invTransform( QwtPlot::xBottom, rect.left() ), myPlot->invTransform( QwtPlot::xBottom, rect.right() ) ); myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -835,6 +845,7 @@ void Plot2d_ViewFrame::fitData(const int mode, if ( mode == 0 || mode == 1 ) myPlot->setAxisScale( QwtPlot::xBottom, xMin, xMax ); myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -1550,6 +1561,7 @@ void Plot2d_ViewFrame::wheelEvent(QWheelEvent* event) myPlot->setAxisScale( QwtPlot::yRight, y2Map.s1(), y2Map.s1() + aScale*(y2Map.s2() - y2Map.s1()) ); } myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); myPnt = event->pos(); } @@ -1706,6 +1718,11 @@ Plot2d_Plot2d::Plot2d_Plot2d( QWidget* parent ) : QwtPlot( parent ), myIsPolished( false ) { + // Create alternative scales + setAxisScaleDraw( QwtPlot::yLeft, new Plot2d_ScaleDraw() ); + setAxisScaleDraw( QwtPlot::xBottom, new Plot2d_ScaleDraw() ); + setAxisScaleDraw( QwtPlot::yRight, new Plot2d_ScaleDraw() ); + myPlotZoomer = new Plot2d_QwtPlotZoomer( QwtPlot::xBottom, QwtPlot::yLeft, canvas() ); myPlotZoomer->setSelectionFlags( QwtPicker::DragSelection | QwtPicker::CornerToCorner ); myPlotZoomer->setTrackerMode( QwtPicker::AlwaysOff ); @@ -1714,11 +1731,6 @@ Plot2d_Plot2d::Plot2d_Plot2d( QWidget* parent ) defaultPicker(); - // Create alternative scales - setAxisScaleDraw( QwtPlot::yLeft, new Plot2d_ScaleDraw() ); - setAxisScaleDraw( QwtPlot::xBottom, new Plot2d_ScaleDraw() ); - setAxisScaleDraw( QwtPlot::yRight, new Plot2d_ScaleDraw() ); - // auto scaling by default setAxisAutoScale( QwtPlot::yLeft ); setAxisAutoScale( QwtPlot::yRight ); @@ -1741,6 +1753,7 @@ Plot2d_Plot2d::Plot2d_Plot2d( QWidget* parent ) canvas()->setMouseTracking( true ); myPlotZoomer->setEnabled( true ); + myPlotZoomer->setZoomBase(); } /*! diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index bb25204f4..a903be0b8 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -229,6 +229,7 @@ public: QwtPlotGrid* grid() { return myGrid; }; CurveDict& getCurves() { return myCurves; } Plot2d_Curve* getClosestCurve( QPoint p, double& distance, int& index ); + QwtPlotZoomer* zoomer() const { return myPlotZoomer; } virtual void updateYAxisIdentifiers(); diff --git a/src/STD/resources/STD_msg_fr.ts b/src/STD/resources/STD_msg_fr.ts index 852978108..d4a11f3c6 100755 --- a/src/STD/resources/STD_msg_fr.ts +++ b/src/STD/resources/STD_msg_fr.ts @@ -172,7 +172,7 @@ Un répertoire avec ce nom existe déjà sur le disque. Essayez d'utiliser MEN_DESK_VIEW - &Vue + &Affichage PRP_DESK_HELP_ABOUT @@ -184,7 +184,7 @@ Un répertoire avec ce nom existe déjà sur le disque. Essayez d'utiliser MEN_DESK_EDIT - &Editer + &Edition MEN_DESK_HELP diff --git a/src/SalomeApp/salome_pluginsmanager.py b/src/SalomeApp/salome_pluginsmanager.py index 00199335d..da726a837 100644 --- a/src/SalomeApp/salome_pluginsmanager.py +++ b/src/SalomeApp/salome_pluginsmanager.py @@ -77,12 +77,21 @@ plugins={} current_plugins_manager=None def initialize(module,name,basemenuname,menuname): - if plugins.has_key(name):return - plugins[name]=PluginsManager(module,name,basemenuname,menuname) + if not plugins.has_key(name): + if module: + plugins[name]={} + else: + plugins[name]=[] + if module: + studyId=sg.getActiveStudyId() + if plugins[name].has_key(studyId):return + plugins[name][studyId]=PluginsManager(module,name,basemenuname,menuname) + else: + plugins[name].append(PluginsManager(module,name,basemenuname,menuname)) class Context: - def __init__(self,sg): - self.sg=sg + def __init__(self,sgpyqt): + self.sg=sgpyqt self.studyId=salome.sg.getActiveStudyId() self.study= salome.myStudyManager.GetStudyByID(self.studyId)