Commit d38bf0a0 authored by allens's avatar allens

minor clean for efficent point loading

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22090 18c085ea-50e0-402c-830e-de6fd14e8384
parent 9ee430b1
......@@ -1227,6 +1227,10 @@ QvisIntegralCurveWindow::UpdateWindow(bool doAll)
break;
case IntegralCurveAttributes::ID_pointList:
{
pointList->blockSignals(true);
QListWidgetItem *item = NULL;
std::vector<double> points = atts->GetPointList();
pointList->clear();
......@@ -1237,9 +1241,13 @@ QvisIntegralCurveWindow::UpdateWindow(bool doAll)
QString str = tmp;
QListWidgetItem *item = new QListWidgetItem(str, pointList);
item->setFlags(item->flags() | Qt::ItemIsEditable);
pointList->setCurrentItem(item);
}
if( item )
pointList->setCurrentItem(item);
pointList->blockSignals(false);
break;
}
......@@ -3025,6 +3033,8 @@ QvisIntegralCurveWindow::deletePoints()
void
QvisIntegralCurveWindow::readPoints()
{
pointList->blockSignals(true);
QListWidgetItem *item = NULL;
QString res = QFileDialog::getOpenFileName(NULL, tr("Open text file"), ".");
......@@ -3063,6 +3073,8 @@ QvisIntegralCurveWindow::readPoints()
if( item )
pointList->setCurrentItem(item);
pointList->blockSignals(false);
}
void
......
......@@ -681,7 +681,7 @@ QvisStreamlinePlotWindow::CreateWindowContents()
connect(maxDistance, SIGNAL(returnPressed()), this, SLOT(maxDistanceProcessText()));
terminationLayout->addWidget(maxDistance, 2,1);
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Appearance tab
// ----------------------------------------------------------------------
QWidget *appearanceTab = new QWidget(central);
......@@ -1552,8 +1552,12 @@ QvisStreamlinePlotWindow::UpdateWindow(bool doAll)
break;
case StreamlineAttributes::ID_pointList:
{
pointList->blockSignals(true);
std::vector<double> points = streamAtts->GetPointList();
QListWidgetItem *item = NULL;
pointList->clear();
for (int i = 0; i < points.size(); i+= 3)
{
......@@ -1562,9 +1566,13 @@ QvisStreamlinePlotWindow::UpdateWindow(bool doAll)
QString str = tmp;
QListWidgetItem *item = new QListWidgetItem(str, pointList);
item->setFlags(item->flags() | Qt::ItemIsEditable);
pointList->setCurrentItem(item);
}
if( item )
pointList->setCurrentItem(item);
pointList->blockSignals(false);
break;
}
......@@ -1673,11 +1681,13 @@ QvisStreamlinePlotWindow::UpdateWindow(bool doAll)
tubeSizeType->hide();
ribbonSizeType->hide();
geomRadiusLabel->hide();
tubeDisplayDensityLabel->hide();
tubeDisplayDensity->hide();
tubeRadiusVary->hide();
tubeRadiusVaryVariable->hide();
tubeRadiusVaryVariableLabel->hide();
tubeRadiusVaryFactorLabel->hide();
tubeRadiusVaryFactorEdit->hide();
}
......@@ -4418,6 +4428,10 @@ QvisStreamlinePlotWindow::deletePoints()
void
QvisStreamlinePlotWindow::readPoints()
{
pointList->blockSignals(true);
QListWidgetItem *item = NULL;
QString res = QFileDialog::getOpenFileName(NULL, tr("Open text file"), ".");
std::string filename = res.toLatin1().data();
......@@ -4445,13 +4459,17 @@ QvisStreamlinePlotWindow::readPoints()
{
char vals[256];
sprintf(vals, "%f %f %f", x,y,z);
QListWidgetItem *item = new QListWidgetItem(vals, pointList);
item = new QListWidgetItem(vals, pointList);
item->setFlags(item->flags() | Qt::ItemIsEditable);
pointList->setCurrentItem(item);
}
}
f.close();
if( item )
pointList->setCurrentItem(item);
pointList->blockSignals(false);
}
void
......
......@@ -360,7 +360,6 @@ class QvisStreamlinePlotWindow : public QvisPostableWindowObserver
QComboBox *displayMethod;
QCheckBox *tubeRadiusVary;
QComboBox *tubeRadiusVaryMethod;
QLabel *tubeRadiusVaryVariableLabel, *tubeRadiusVaryFactorLabel;
QvisVariableButton *tubeRadiusVaryVariable;
QLineEdit *tubeRadiusVaryFactorEdit;
......
......@@ -499,4 +499,3 @@ StreamlineAttributes::ProcessOldVersions(DataNode *parentNode,
parentNode->AddNode(newNode2);
}
}
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