diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/GL3DWidget.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/GL3DWidget.h index 924d4b18011228c6416909caf1004a6518cabba1..ba0ca7ae2430e3dcdbf5378726f26d083f82a961 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/GL3DWidget.h +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/GL3DWidget.h @@ -67,6 +67,7 @@ public: void saveToFile(const QString & filename); void getViewport(int& w,int& h){_viewport->getViewport(&w,&h);} RenderMode getRenderMode()const{return m_renderMode;} + bool areAxesOn()const{return m3DAxesShown;} signals: void actorsPicked(const std::set<QRgb>& ); diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp index 830796a5fede3ffb6a9282d8f0a61cef71af5d17..4c9b3bdedfbdacf7d297c0f71b3abbb0353c6178 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp @@ -141,7 +141,7 @@ void InstrumentWindow::tabChanged(int i) if (mInstrumentDisplay->getRenderMode() == GL3DWidget::FULL3D) { text = tr("Mouse Button: Left -- Rotation, Middle -- Zoom, Right -- Translate\nKeyboard: NumKeys -- Rotation, PageUp/Down -- Zoom, ArrowKeys -- Translate"); - if( m_renderTab->areAxesOn() ) + if( mInstrumentDisplay->areAxesOn() ) { text += "\nAxes: X = Red; Y = Green; Z = Blue"; } @@ -581,7 +581,7 @@ void InstrumentWindow::setInfoText(const QString& text) // if(mInstrumentDisplay->getInteractionMode() == Instrument3DWidget::PickMode) //{ // text = tr("Mouse Button: Left -- Rotation, Middle -- Zoom, Right -- Translate\nKeyboard: NumKeys -- Rotation, PageUp/Down -- Zoom, ArrowKeys -- Translate"); - // if( m_renderTab->areAxesOn() ) + // if( mInstrumentDisplay->areAxesOn() ) // { // text += "\nAxes: X = Red; Y = Green; Z = Blue"; // } diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp index 9393a84442787d4ea22f0335d648bbbaefdfeba2..954b34d72d3de93d4ee6442a9435817e0569823a 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp @@ -228,7 +228,10 @@ void InstrumentWindowRenderTab::loadSettings(const QString& section) QSettings settings; settings.beginGroup(section); int show3daxes = settings.value("3DAxesShown", 1 ).toInt(); + m_instrWindow->set3DAxesState(show3daxes != 0); + m_displayAxes->blockSignals(true); m_displayAxes->setChecked(show3daxes != 0); + m_displayAxes->blockSignals(false); settings.endGroup(); } @@ -275,7 +278,7 @@ void InstrumentWindowRenderTab::setAxis(const QString& axisNameArg) bool InstrumentWindowRenderTab::areAxesOn()const { - return m_displayAxes->isChecked(); + return mInstrumentDisplay->areAxesOn(); } /** diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h index a2c76dd7d8a1183def5e2245623458cdd3a25ffc..455cdeed603cf18a35b34c28bbda0a5dbf79fb8e 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h @@ -57,6 +57,7 @@ private: QAction *m_displayAxes; QAction *m_wireframe; QAction *m_lighting; + };