Commit c77ecb26 authored by hrchilds's avatar hrchilds
Browse files

Improve error message for data binning; automatically expand plot when

adding an operator.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12396 18c085ea-50e0-402c-830e-de6fd14e8384
parent b7cbf3d7
......@@ -235,6 +235,9 @@ avtDataBinningFilter::Execute(void)
// Hank Childs, Tue Aug 31 10:20:08 PDT 2010
// Change names of added variable.
//
// Hank Childs, Tue Aug 31 13:28:48 PDT 2010
// Beef up error messages.
//
// ****************************************************************************
avtContract_p
......@@ -254,9 +257,12 @@ avtDataBinningFilter::ModifyContract(avtContract_p inContract)
dim1Var = pipelineVariable;
else
{
EXCEPTION1(VisItException, "You can't use the default variable "
"in a data binning when you are plotting the "
"data binning (recursive definition).");
EXCEPTION1(VisItException, "You specified the first dimension of the "
"data binning as \"default\", but your plotting variable "
"(which \"default\" resolves to) is of the output of the "
"data binning. This is a recursion definition. Please "
"change the first dimension of the data binning to be "
"something besides \"default\".");
}
}
const char *dim2Var = atts.GetDim2Var().c_str();
......@@ -268,9 +274,12 @@ avtDataBinningFilter::ModifyContract(avtContract_p inContract)
dim2Var = pipelineVariable;
else
{
EXCEPTION1(VisItException, "You can't use the default variable "
"in a data binning when you are plotting the "
"data binning (recursive definition).");
EXCEPTION1(VisItException, "You specified the second dimension of the "
"data binning as \"default\", but your plotting variable "
"(which \"default\" resolves to) is of the output of the "
"data binning. This is a recursion definition. Please "
"change the first dimension of the data binning to be "
"something besides \"default\".");
}
}
const char *dim3Var = atts.GetDim3Var().c_str();
......@@ -281,9 +290,12 @@ avtDataBinningFilter::ModifyContract(avtContract_p inContract)
dim3Var = pipelineVariable;
else
{
EXCEPTION1(VisItException, "You can't use the default variable "
"in a data binning when you are plotting the "
"data binning (recursive definition).");
EXCEPTION1(VisItException, "You specified the third dimension of the "
"data binning as \"default\", but your plotting variable "
"(which \"default\" resolves to) is of the output of the "
"data binning. This is a recursion definition. Please "
"change the first dimension of the data binning to be "
"something besides \"default\".");
}
}
......@@ -315,7 +327,19 @@ avtDataBinningFilter::ModifyContract(avtContract_p inContract)
atts.GetReductionOperator() != DataBinningAttributes::Count)
{
if (atts.GetVarForReduction() == "default")
out_dr->AddSecondaryVariable(pipelineVariable);
{
if (defaultVarOK)
out_dr->AddSecondaryVariable(pipelineVariable);
else
{
EXCEPTION1(VisItException, "You specified the variable for the reduction operator of your "
"data binning as \"default\", but your plotting variable "
"(which \"default\" resolves to) is of the output of the "
"data binning. This is a recursion definition. Please "
"change the first dimension of the data binning to be "
"something besides \"default\".");
}
}
else
out_dr->AddSecondaryVariable(atts.GetVarForReduction().c_str());
}
......
......@@ -1495,6 +1495,9 @@ ViewerPlot::GetExpressions() const
// Hank Childs, Tue Aug 31 11:32:31 PDT 2010
// If we get an operator variable, then add that variable.
//
// Hank Childs, Tue Aug 31 13:33:00 PDT 2010
// Expand the plot automatically when we add an auto-operator.
//
// ****************************************************************************
bool
......@@ -1659,7 +1662,10 @@ ViewerPlot::SetVariableName(const std::string &name)
}
if (!hasAlready)
{
AddOperator(j, true);
SetExpanded(true);
}
break;
}
}
......
......@@ -2497,6 +2497,9 @@ ViewerPlotList::GetNumVisiblePlots() const
// Code for auto-applying operators, originally placed in the GUI by
// Rob and then moved to viewer and adapted by Hank.
//
// Hank Childs, Tue Aug 31 13:33:00 PDT 2010
// Expand the plot automatically when we add an auto-operator.
//
// ****************************************************************************
int
......@@ -2632,7 +2635,10 @@ ViewerPlotList::AddPlot(int type, const std::string &var, bool replacePlots,
}
if (!hasAlready)
{
newPlot->AddOperator(j, true);
newPlot->SetExpanded(true);
}
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment