From e76adc4e7943138f751db41d6c3f1e3f297498b7 Mon Sep 17 00:00:00 2001 From: Roman Tolchenov Date: Mon, 12 Jan 2015 10:07:04 +0000 Subject: [PATCH] Re #10143. Added component position info. --- .../InstrumentWindowPickTab.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp index 33508a2c8df6..ab132b7cc711 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindowPickTab.cpp @@ -342,8 +342,7 @@ void InstrumentWindowPickTab::setPlotCaption() void InstrumentWindowPickTab::sumDetectors() { m_plotController->setPlotType( DetectorPlotController::TubeSum ); - m_plot->clearAll(); - m_plot->replot(); + m_plotController->updatePlot(); setPlotCaption(); } @@ -353,8 +352,7 @@ void InstrumentWindowPickTab::sumDetectors() void InstrumentWindowPickTab::integrateTimeBins() { m_plotController->setPlotType( DetectorPlotController::TubeIntegral ); - m_plot->clearAll(); - m_plot->replot(); + m_plotController->updatePlot(); setPlotCaption(); } @@ -508,8 +506,7 @@ void InstrumentWindowPickTab::setTubeXUnits(int units) if (units < 0 || units >= DetectorPlotController::NUMBER_OF_UNITS) return; auto tubeXUnits = static_cast(units); m_plotController->setTubeXUnits(tubeXUnits); - m_plot->clearAll(); - m_plot->replot(); + m_plotController->updatePlot(); } @@ -529,8 +526,7 @@ QColor InstrumentWindowPickTab::getShapeBorderColor() const */ void InstrumentWindowPickTab::changedIntegrationRange(double,double) { - m_plot->clearAll(); - m_plot->replot(); + m_plotController->updatePlot(); auto surface = m_instrWindow->getSurface(); if ( surface ) { @@ -845,8 +841,12 @@ QString ComponentInfoController::displayNonDetectorInfo(Mantid::Geometry::Compon { auto component = m_instrActor->getInstrument()->getComponentByID(compID); QString text = "Selected component: "; - text += QString::fromStdString(component->getName()); - text += "\n"; + text += QString::fromStdString(component->getName()) + '\n'; + Mantid::Kernel::V3D pos = component->getPos(); + text += "xyz: " + QString::number(pos.X()) + "," + QString::number(pos.Y()) + "," + QString::number(pos.Z()) + '\n'; + double r,t,p; + pos.getSpherical(r,t,p); + text += "rtp: " + QString::number(r) + "," + QString::number(t) + "," + QString::number(p) + '\n'; text += getParameterInfo(component); return text; }