Commit 766cc048 authored by hrchilds's avatar hrchilds

Update from March 1, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@422 18c085ea-50e0-402c-830e-de6fd14e8384
parent 91813d09
......@@ -74,6 +74,10 @@ avtDatasetQuery::~avtDatasetQuery()
// Kathleen Bonnell, Fri Nov 15 09:07:36 PST 2002
// Set queryAtts results value.
//
// Kathleen Bonnell, Tue Mar 1 11:20:15 PST 2005
// Test for empty data tree after ApplyFilters, and submit an error
// message.
//
// ****************************************************************************
void
......@@ -93,19 +97,48 @@ avtDatasetQuery::PerformQuery(QueryAttributes *qA)
// Reset the input so that we have access to the data tree.
//
SetTypedInput(dob);
PreExecute();
avtDataTree_p tree = GetInputDataTree();
totalNodes = tree->GetNumberOfLeaves();
Execute(tree);
PostExecute();
bool validInputTree = false;
// No need to process an empty tree.
if (!tree->IsEmpty())
{
totalNodes = tree->GetNumberOfLeaves();
PreExecute();
Execute(tree);
PostExecute();
//
// Retrieve the query results and set the message in the atts.
//
queryAtts.SetResultsMessage(resMsg);
queryAtts.SetResultsValue(resValue);
validInputTree = true;
//
// Retrieve the query results and set the message in the atts.
//
queryAtts.SetResultsMessage(resMsg);
queryAtts.SetResultsValue(resValue);
}
else
{
// An empty tree at this point is the sign that something bad has
// happened during the 'update' cycle called by ApplyFilters.
// Set the flag to false -- use OR, becuase for QueryOverTime,
// We only want to send the InternalError message if all time steps
// encountered empty trees.
validInputTree != false;
debug4 << "Query encountered EMPTY InputDataTree after ApplyFilters!!"
<< endl;
}
if (validInputTree)
{
//
// Retrieve the query results and set the message in the atts.
//
queryAtts.SetResultsMessage(resMsg);
queryAtts.SetResultsValue(resValue);
}
else
{
queryAtts.SetResultsMessage("Query(" + queryAtts.GetName() + ")"
" encountered an internal error and could not execute "
" successfully. Please contact a VisIt developer.");
}
UpdateProgress(1, 0);
*qA = queryAtts;
......
......@@ -1302,3 +1302,27 @@ EngineProxy::GetSimulationSILAtts()
return silAtts;
}
// ****************************************************************************
// Method: EngineProxy::UpdateExpressions
//
// Purpose:
// Make sure the engine knows about the current expression list.
//
// Arguments:
// expressions The new expression list.
//
// Programmer: Kathleen Bonnell
// Creation: March 1, 2005
//
// ****************************************************************************
void
EngineProxy::UpdateExpressions(const ExpressionList &expressions)
{
if (exprList != expressions)
{
exprList = expressions;
exprList.Notify();
}
}
......@@ -217,6 +217,9 @@ class StatusAttributes;
// I added ExpressionList to the call to ReadDataObject so we can pass
// in the right list of expressions.
//
// Kathleen Bonnell, Tue Mar 1 11:20:15 PST 2005
// Added UpdateExpressions.
//
// ****************************************************************************
class ENGINE_PROXY_API EngineProxy : public RemoteProxyBase
......@@ -301,6 +304,7 @@ public:
void ReleaseData(const int);
void CloneNetwork(const int, const QueryOverTimeAttributes *);
void UpdateExpressions(const ExpressionList &);
protected:
virtual void SetupComponentRPCs();
......
......@@ -3046,3 +3046,28 @@ ViewerEngineManager::GetSimulationSILAtts(const EngineKey &ek)
EXCEPTION0(NoEngineException);
}
// ****************************************************************************
// Method: ViewerEngineManager::UpdateExpressionsFromPlot
//
// Purpose:
// Tells the engine to update its epxressions.
//
// Arguments:
// plot The plot that has the expressions that should be updated.
//
// Programmer: Kathleen Bonnell
// Creation: March 1, 2005
//
// ****************************************************************************
void
ViewerEngineManager::UpdateExpressionsFromPlot(const ViewerPlot *plot)
{
EngineKey ek(plot->GetEngineKey());
if (EngineExists(ek))
engines[ek].proxy->UpdateExpressions(plot->GetExpressions());
else
EXCEPTION0(NoEngineException);
}
......@@ -196,6 +196,10 @@ class avtDatabaseMetaData;
//
// Mark C. Miller, Tue Jan 4 10:23:19 PST 2005
// Added window Id to various calls to support multiwindow SR
//
// Kathleen Bonnell, Tue Mar 1 11:20:15 PST 2005
// Added UdpateExpressionsFromPlot.
//
// ****************************************************************************
class VIEWER_API ViewerEngineManager : public ViewerServerManager,
......@@ -290,6 +294,7 @@ class VIEWER_API ViewerEngineManager : public ViewerServerManager,
const QueryOverTimeAttributes *qatts);
void CreateNode(DataNode *) const;
void UpdateExpressionsFromPlot(const ViewerPlot *);
protected:
ViewerEngineManager();
......
......@@ -1586,6 +1586,10 @@ ViewerQueryManager::ClearPickPoints()
// Mark C. Miller, Tue Jan 4 10:23:19 PST 2005
// Added window id to Pick RPC
//
// Kathleen Bonnell, Tue Mar 1 11:20:15 PST 2005
// Ensure that the engine has the correct expression list from the plot
// that we are picking, so that pick will not fail.
//
// ****************************************************************************
bool
......@@ -1827,6 +1831,7 @@ ViewerQueryManager::ComputePick(PICK_POINT_INFO *ppi, const int dom,
TRY
{
PickAttributes pa = *pickAtts;
ViewerEngineManager::Instance()->UpdateExpressionsFromPlot(plot);
ViewerEngineManager::Instance()->Pick(engineKey,
networkId, windowId,
&pa, pa);
......
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