Skip to content

Commit

Permalink
refs #7445. Enable properties based on output type.
Browse files Browse the repository at this point in the history
Box controller properties only apply to MDWorkspaces.
  • Loading branch information
OwenArnold committed Jul 16, 2013
1 parent 1a91541 commit 0649f23
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ You will usually want to rebin using [[BinMD]] or [[SliceMD]] after transformati
#include "MantidKernel/TimeSeriesProperty.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidKernel/ListValidator.h"
#include "MantidKernel/EnabledWhenProperty.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/IEventWorkspace.h"
#include "MantidMDEvents/MDEventWorkspace.h"
Expand Down Expand Up @@ -245,7 +246,13 @@ namespace MDEvents

declareProperty(new WorkspaceProperty<IMDWorkspace>("OutputWorkspace","",Direction::Output), "Output 2D Workspace.");

// Create box controller properties.
this->initBoxControllerProps("2,2", 50, 10);

// Only show box controller properties when a md workspace is returned.
setPropertySettings("SplitInto", new EnabledWhenProperty("OutputAsMDWorkspace", IS_DEFAULT) );
setPropertySettings("SplitThreshold", new EnabledWhenProperty("OutputAsMDWorkspace", IS_DEFAULT) );
setPropertySettings("MaxRecursionDepth", new EnabledWhenProperty("OutputAsMDWorkspace", IS_DEFAULT) );
}

//----------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 0649f23

Please sign in to comment.