diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.cpp index d58ff1cfa179438ce358ffdac1f6f0ae312db9cb..98e84118cb2d55305a15e280b47ad86f018f22db 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.cpp @@ -141,6 +141,12 @@ void InstrumentActor::setIntegrationRange(const double& xmin,const double& xmax) resetColors(); } +double InstrumentActor::getIntegratedCounts(Mantid::detid_t id)const +{ + size_t i = (*m_id2wi_map)[id]; + return m_specIntegrs.at(i); +} + void InstrumentActor::resetColors() { QwtDoubleInterval qwtInterval(m_DataMinValue,m_DataMaxValue); diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.h index 3b7783353c97429106dbc746ef9a650f08b2c390..0889279a915bc595d90e9ba508aaf9c888124afd 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.h +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentActor.h @@ -94,6 +94,7 @@ public: const std::vector<Mantid::detid_t>& getAllDetIDs()const{return m_detIDs;} GLColor getColor(Mantid::detid_t id)const; size_t getWorkspaceIndex(Mantid::detid_t id)const{return (*m_id2wi_map)[id];} + double getIntegratedCounts(Mantid::detid_t id)const; void update(); void invalidateDisplayLists()const{m_scene.invalidateDisplayList();} QString getCurrentColorMap()const{return m_currentColorMap;} diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp index aa6d0632eee1ead442f837cd90d8ad9f0f0c0303..905bd50846ec97b550a6a340d7dec901e81ebd47 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp @@ -211,6 +211,7 @@ void InstrumentWindow::setSurfaceType(int type) } m_InstrumentDisplay->setSurface(surface); m_InstrumentDisplay->update(); + m_renderTab->init(); m_maskTab->init(); connect(surface,SIGNAL(singleDetectorTouched(int)),this,SLOT(singleDetectorTouched(int))); diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowMaskTab.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowMaskTab.cpp index 90d76f1cbb2cf36956dd57210dd78929840d1c95..024ae21170a9d8f38f1ab1f596e951c43b45f3bb 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowMaskTab.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowMaskTab.cpp @@ -64,13 +64,13 @@ m_userEditing(true) m_ring_ellipse->setCheckable(true); m_ring_ellipse->setAutoExclusive(true); m_ring_ellipse->setIcon(QIcon(":/MaskTools/selection-circle.png")); - m_ring_ellipse->setToolTip("Draw an ellipse"); + m_ring_ellipse->setToolTip("Draw an elliptical ring"); m_ring_rectangle = new QPushButton(); m_ring_rectangle->setCheckable(true); m_ring_rectangle->setAutoExclusive(true); m_ring_rectangle->setIcon(QIcon(":/MaskTools/selection-box.png")); - m_ring_rectangle->setToolTip("Draw a rectangle"); + m_ring_rectangle->setToolTip("Draw a rectangular ring "); QHBoxLayout* toolBox = new QHBoxLayout(); toolBox->addWidget(m_move); @@ -122,7 +122,7 @@ m_userEditing(true) QGridLayout* buttons = new QGridLayout(); buttons->addWidget(m_apply,0,0); buttons->addWidget(m_clear_all,0,1); - buttons->addWidget(m_save_as_workspace,1,0,1,2); + //buttons->addWidget(m_save_as_workspace,1,0,1,2); layout->addLayout(buttons); } diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp index e772725d95d3b96400b910bf893c09ac86c8e11f..7f166fd059ee5320e076abdff67f3de7bb56ce7d 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp @@ -171,6 +171,7 @@ void InstrumentWindowPickTab::updateSelectionInfo(int detid) { text += "Parent assembly: " + QString::fromStdString(parent->getName()) + '\n'; } + text += "Counts: " + QString::number(instrActor->getIntegratedCounts(detid)) + '\n'; m_selectionInfoDisplay->setText(text); } else diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp index 8ac7679e8429a9808799fe0b244643c2df70a3d0..7bdbf202b0f77d4f4d7fc301c2714e8777aea477 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.cpp @@ -116,6 +116,10 @@ QFrame * InstrumentWindowRenderTab::setupAxisFrame() loadSettings("Mantid/InstrumentWindow"); return m_resetViewFrame; } +void InstrumentWindowRenderTab::init() +{ + setAxis(QString::fromStdString(m_instrWindow->getInstrumentActor()->getInstrument()->getDefaultAxis())); +} /** * diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h index fc679a14e9a001fb7f92342db3281d6fdddfaf19..03aac5d224e78e268e87bcae57d8dea18a51d9d4 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowRenderTab.h @@ -35,6 +35,7 @@ public: void setScaleType(GraphOptions::ScaleType type); void setAxis(const QString& axisName); bool areAxesOn()const; + void init(); public slots: void showAxes(bool on); private slots: diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp index e3159b83b2fd28d0077acda8be6b482a86d855cc..c8f6476e833fcdce3b89281964d3b153cbd4f4c7 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp @@ -243,27 +243,27 @@ void Projection3D::changeColorMap() void Projection3D::setViewDirection(const QString& input) { - if(input.compare("X+")==0) + if(input.toUpper().compare("X+")==0) { m_trackball->setViewToXPositive(); } - else if(input.compare("X-")==0) + else if(input.toUpper().compare("X-")==0) { m_trackball->setViewToXNegative(); } - else if(input.compare("Y+")==0) + else if(input.toUpper().compare("Y+")==0) { m_trackball->setViewToYPositive(); } - else if(input.compare("Y-")==0) + else if(input.toUpper().compare("Y-")==0) { m_trackball->setViewToYNegative(); } - else if(input.compare("Z+")==0) + else if(input.toUpper().compare("Z+")==0) { m_trackball->setViewToZPositive(); } - else if(input.compare("Z-")==0) + else if(input.toUpper().compare("Z-")==0) { m_trackball->setViewToZNegative(); }