Skip to content

Commit

Permalink
Refs #5101. Adding masked entry for MaskWorkspace data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Apr 13, 2012
1 parent dbc05b9 commit 8cb5385
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/MantidPlot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ include_directories ( src/lib/include )
include_directories ( src/lib/3rdparty/qtcolorpicker/src )
include_directories ( ../MantidQt/SliceViewer/inc )
include_directories ( ../MantidQt/Factory/inc )

include_directories ( ../Framework/DataObjects/inc )

###########################################################################
# Application icon files
Expand All @@ -776,7 +776,7 @@ add_executable ( MantidPlot ${WIN_CONSOLE} MACOSX_BUNDLE ${ALL_SRC} src/main.cpp

# Library dependencies
target_link_libraries ( MantidPlot
${CORE_MANTIDLIBS}
${CORE_MANTIDLIBS} DataObjects
MantidQtAPI MantidWidgets MantidQtSliceViewer MantidQtFactory
QtPropertyBrowser ${QT_LIBRARIES}
${QWT_LIBRARIES} ${QWTPLOT3D_LIBRARIES}
Expand Down
14 changes: 13 additions & 1 deletion Code/Mantid/MantidPlot/src/Mantid/MantidDock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <MantidAPI/FileProperty.h>
#include <MantidGeometry/MDGeometry/IMDDimension.h>
#include <MantidQtAPI/InterfaceManager.h>
#include <MantidDataObjects/MaskWorkspace.h>
#include "MantidMatrix.h"
#include <QInputDialog>
#include <QMessageBox>
Expand Down Expand Up @@ -43,6 +44,7 @@
using namespace Mantid::API;
using namespace Mantid::Kernel;
using namespace Mantid::Geometry;
using namespace Mantid::DataObjects;

Mantid::Kernel::Logger& MantidDockWidget::logObject=Mantid::Kernel::Logger::get("mantidDockWidget");
Mantid::Kernel::Logger& MantidTreeWidget::logObject=Mantid::Kernel::Logger::get("MantidTreeWidget");
Expand Down Expand Up @@ -692,7 +694,17 @@ void MantidDockWidget::populateMatrixWorkspaceData(Mantid::API::MatrixWorkspace_
excludeItemFromSort(data_item);
ws_item->addChild(data_item);
}

else
{
if (workspace->id() == "MaskWorkspace")
{
MaskWorkspace_sptr maskWS = boost::dynamic_pointer_cast<MaskWorkspace>(workspace);
data_item = new MantidTreeWidgetItem(QStringList("Masked: "+ QLocale(QLocale::English).toString(double(maskWS->getNumberMasked()), 'd', 0)), m_tree);
data_item->setFlags(Qt::NoItemFlags);
excludeItemFromSort(data_item);
ws_item->addChild(data_item);
}
}

//Extra stuff for EventWorkspace
Mantid::API::IEventWorkspace_sptr eventWS = boost::dynamic_pointer_cast<Mantid::API::IEventWorkspace> ( workspace );
Expand Down

0 comments on commit 8cb5385

Please sign in to comment.