Commit 68494b55 authored by loring's avatar loring

override process old versions to fix backward incompatible

change to spreadsheet attributes introduced in r7405.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23807 18c085ea-50e0-402c-830e-de6fd14e8384
parent e9ee4aef
......@@ -680,3 +680,55 @@ SpreadsheetViewerPluginInfo::Permits2DViewScaling() const
return false;
}
Target: xml2atts
Function: ProcessOldVersions
Declaration: virtual void ProcessOldVersions(DataNode *parentNode, const char *configVersion);
Definition:
// ****************************************************************************
// Method: SpreadsheetAttributes::ProcessOldVersions
//
// Purpose:
// This method handles some old fields by converting them to new fields.
//
// Programmer: Burlen Loring
// Creation: Fri Jul 18 15:20:59 PDT 2014
//
// Modifications:
//
// ****************************************************************************
void
SpreadsheetAttributes::ProcessOldVersions(DataNode *parentNode,
const char *configVersion)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("SpreadsheetAttributes");
if(searchNode == 0)
return;
// deal with the changes in r7405 where type of currentPick was
// changed from double[3] to int. Since that patch pick related
// attributes are no longer recorded in session files so we will
// need to ignore them here.
if(VersionLessThan(configVersion, "2.0.0"))
{
const char *pickAtts[] = {
"currentPick",
"currentPickType",
"currentPickValid",
"currentPickLetter",
"pastPicks",
"pastPickLetters"
};
for (size_t i=0; i<6; ++i)
{
DataNode *pickAtt = searchNode->GetNode(pickAtts[i]);
if (pickAtt)
{
searchNode->RemoveNode(pickAtt, true);
}
}
}
}
......@@ -91,7 +91,7 @@
<Function name="CreateCompatible" user="false" member="true">
</Function>
<Function name="SetSubsetName" user="false" member="true">
</Function>
</Function>
<Function name="CreateNode" user="false" member="true">
</Function>
<Function name="SpreadsheetViewerPluginInfo::InitializePlotAtts" user="false" member="true">
......@@ -120,6 +120,8 @@
</Function>
<Function name="SpreadsheetViewerPluginInfo::Permits2DViewScaling" user="false" member="true">
</Function>
<Function name="ProcessOldVersions" user="true" member="true">
</Function>
<Include file="header" quoted="false">
PlaneAttributes.h
</Include>
......
......@@ -1328,3 +1328,51 @@ SpreadsheetAttributes::ChangesRequireRecalculation(const SpreadsheetAttributes &
return (subsetName != obj.subsetName);
}
// ****************************************************************************
// Method: SpreadsheetAttributes::ProcessOldVersions
//
// Purpose:
// This method handles some old fields by converting them to new fields.
//
// Programmer: Burlen Loring
// Creation: Fri Jul 18 15:20:59 PDT 2014
//
// Modifications:
//
// ****************************************************************************
void
SpreadsheetAttributes::ProcessOldVersions(DataNode *parentNode,
const char *configVersion)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("SpreadsheetAttributes");
if(searchNode == 0)
return;
// deal with the changes in r7405 where type of currentPick was
// changed from double[3] to int. Since that patch pick related
// attributes are no longer recorded in session files so we will
// need to ignore them here.
if(VersionLessThan(configVersion, "2.0.0"))
{
const char *pickAtts[] = {
"currentPick",
"currentPickType",
"currentPickValid",
"currentPickLetter",
"pastPicks",
"pastPickLetters"
};
for (size_t i=0; i<6; ++i)
{
DataNode *pickAtt = searchNode->GetNode(pickAtts[i]);
if (pickAtt)
{
searchNode->RemoveNode(pickAtt, true);
}
}
}
}
......@@ -170,6 +170,7 @@ public:
// User-defined methods
bool ChangesRequireRecalculation(const SpreadsheetAttributes &) const;
virtual void ProcessOldVersions(DataNode *parentNode, const char *configVersion);
// IDs that can be used to identify fields in case statements
enum {
......
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