Commit b829b94c authored by pugmire's avatar pugmire
Browse files

merge from 2.7RC

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23402 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5285175c
...@@ -85,12 +85,16 @@ using std::vector; ...@@ -85,12 +85,16 @@ using std::vector;
// Creation: December 18, 2011 // Creation: December 18, 2011
// //
// Modifications: // Modifications:
// Jonathan Byrd, Mon Feb 4, 2013
// Add variable and element to pick record
// //
// **************************************************************************** // ****************************************************************************
PickRecord::PickRecord() { PickRecord::PickRecord() {
domain = -1; domain = -1;
simulation = "<none>"; element = -1;
variable = "<none>";
value = "";
} }
// **************************************************************************** // ****************************************************************************
...@@ -103,12 +107,16 @@ PickRecord::PickRecord() { ...@@ -103,12 +107,16 @@ PickRecord::PickRecord() {
// Creation: December 18, 2011 // Creation: December 18, 2011
// //
// Modifications: // Modifications:
// Jonathan Byrd, Mon Feb 4, 2013
// Add variable and element to pick record
// //
// **************************************************************************** // ****************************************************************************
PickRecord::PickRecord(int dom, std::string &sim) { PickRecord::PickRecord(int dom, std::string &var, int elem, std::string &val) {
domain = dom; domain = dom;
simulation = sim; element = elem;
variable = var;
value = val;
} }
// **************************************************************************** // ****************************************************************************
...@@ -122,12 +130,15 @@ PickRecord::PickRecord(int dom, std::string &sim) { ...@@ -122,12 +130,15 @@ PickRecord::PickRecord(int dom, std::string &sim) {
// Creation: December 18, 2011 // Creation: December 18, 2011
// //
// Modifications: // Modifications:
// // Jonathan Byrd, Mon Feb 4, 2013
// Add variable and element to pick record
// **************************************************************************** // ****************************************************************************
void PickRecord::reset() { void PickRecord::reset() {
domain = -1; domain = -1;
simulation = "<none>"; element = -1;
variable = "<none>";
value = "";
} }
// **************************************************************************** // ****************************************************************************
...@@ -390,7 +401,7 @@ QvisPickWindow::CreateWindowContents() ...@@ -390,7 +401,7 @@ QvisPickWindow::CreateWindowContents()
#ifdef HAVE_DDT #ifdef HAVE_DDT
QPushButton *focusPickInDDTButton = QPushButton *focusPickInDDTButton =
new QPushButton(tr("Focus DDT on Pick"), central); new QPushButton(tr("Add Pick to DDT"), central);
connect(focusPickInDDTButton, SIGNAL(clicked()), connect(focusPickInDDTButton, SIGNAL(clicked()),
this,SLOT(focusPickInDDTClicked())); this,SLOT(focusPickInDDTClicked()));
gLayout->addWidget(focusPickInDDTButton,3,2,1,2); gLayout->addWidget(focusPickInDDTButton,3,2,1,2);
...@@ -987,6 +998,9 @@ QvisPickWindow::UpdateTimeOptions() ...@@ -987,6 +998,9 @@ QvisPickWindow::UpdateTimeOptions()
// Use value in userMaxPickTabs for setting nextPage instead of // Use value in userMaxPickTabs for setting nextPage instead of
// MAX_PICK_TABS. // MAX_PICK_TABS.
// //
// Jonathan Byrd Mon Feb 4, 2013
// Record data concerning the latest pick in the pickRecord array
//
// **************************************************************************** // ****************************************************************************
void void
...@@ -1019,9 +1033,30 @@ QvisPickWindow::UpdatePage() ...@@ -1019,9 +1033,30 @@ QvisPickWindow::UpdatePage()
infoLists[nextPage]->clear(); infoLists[nextPage]->clear();
infoLists[nextPage]->setText(displayString.c_str()); infoLists[nextPage]->setText(displayString.c_str());
// Record the domain belonging to this pick // Record the data concerning this pick
pickRecords[nextPage]->domain = pickAtts->GetDomain(); pickRecords[nextPage]->domain = pickAtts->GetDomain();
pickRecords[nextPage]->simulation = pickAtts->GetDatabaseName(); pickRecords[nextPage]->element = pickAtts->GetElementNumber();
pickRecords[nextPage]->variable = pickAtts->GetActiveVariable();
// Record the value of the active variable of this pick
char buff[256];
buff[0] = '\0';
for (int i=0; i<pickAtts->GetNumVarInfos(); ++i)
{
const PickVarInfo &info = pickAtts->GetVarInfo(i);
const doubleVector &values = info.GetValues();
// For the active variable only
if (info.GetVariableName() == pickRecords[nextPage]->variable)
{
if (info.GetVariableType() == "scalar" && values.size()==1)
{
SNPRINTF(buff, 256, info.GetFloatFormat().c_str(), values[0]);
}
}
}
std::string targetValue(buff);
pickRecords[nextPage]->value = buff;
// Show the tab. // Show the tab.
resultsTabWidget->setCurrentIndex(nextPage); resultsTabWidget->setCurrentIndex(nextPage);
...@@ -2338,13 +2373,13 @@ QvisPickWindow::SubjectRemoved(Subject *TheRemovedSubject) ...@@ -2338,13 +2373,13 @@ QvisPickWindow::SubjectRemoved(Subject *TheRemovedSubject)
// Creation: December 18, 2011 // Creation: December 18, 2011
// //
// Modifications: // Modifications:
// Jonathan Byrd, Mon Feb 4, 2013
// Focus on domain, variable and element, not just domain
// //
// **************************************************************************** // ****************************************************************************
void void
QvisPickWindow::focusPickInDDTClicked() QvisPickWindow::focusPickInDDTClicked()
{ {
int targetDomain = pickRecords[resultsTabWidget->currentIndex()]->domain; const PickRecord *target = pickRecords[resultsTabWidget->currentIndex()];
string targetSim = pickRecords[resultsTabWidget->currentIndex()]->simulation; GetViewerMethods()->DDTFocus(target->domain, target->variable, target->element, target->value);
GetViewerMethods()->DDTFocus(targetDomain);
} }
...@@ -70,14 +70,19 @@ class PlotList; ...@@ -70,14 +70,19 @@ class PlotList;
// Creation: December 18, 2011 // Creation: December 18, 2011
// //
// Modifications: // Modifications:
// Jonathan Byrd, Mon Feb 4, 2013
// Add element and variable to record
//
// **************************************************************************** // ****************************************************************************
class PickRecord { class PickRecord {
public: public:
int domain; int domain;
std::string simulation; int element;
std::string variable;
std::string value;
PickRecord(); PickRecord();
PickRecord(int dom, std::string &sim); PickRecord(int dom, std::string &variable, int element, std::string &value);
void reset(); void reset();
}; };
......
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