Commit ef520ef3 authored by whitlocb's avatar whitlocb

1. Fix for my launch script changes. Thanks Jeremy!

2. Increase max selection size
3. Add "No data" for histogram widgets when they have no data.
4. Clear histogram data when changing the histogram display type in gui.
5. Update splashscreen to June.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@15072 18c085ea-50e0-402c-830e-de6fd14e8384
parent f72aeef0
......@@ -109,6 +109,27 @@ avtNamedSelectionManager::GetInstance(void)
return instance;
}
// ****************************************************************************
// Method: avtNamedSelectionManager::MaximumSelectionSize
//
// Purpose:
// Returns the upper limit on the size of selections we're allowed to create.
//
// Returns: The upper limit on selections we're allowed to create.
//
// Programmer: Brad Whitlock
// Creation: Thu Jun 16 09:54:19 PDT 2011
//
// Modifications:
//
// ****************************************************************************
int
avtNamedSelectionManager::MaximumSelectionSize()
{
return 50000000;
}
// ****************************************************************************
// Method: avtNamedSelectionManager::CreateNamedSelection
//
......@@ -284,7 +305,7 @@ avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob,
int numTotal = 0;
for (i = 0 ; i < PAR_Size() ; i++)
numTotal += numPerProc[i];
if (numTotal > 1000000)
if (numTotal > MaximumSelectionSize())
{
EXCEPTION1(VisItException, "You have selected too many zones in your "
"named selection. Disallowing ... no selection created");
......
......@@ -103,6 +103,8 @@ class PIPELINE_API avtNamedSelectionManager
const SelectionProperties *GetSelectionProperties(const std::string &selName) const;
static int MaximumSelectionSize();
protected:
static avtNamedSelectionManager *instance;
std::vector<avtNamedSelection *> selList;
......
......@@ -359,15 +359,15 @@ if (-d "$visitdir/exe")
if (-e "$visitdir/VERSION")
{
# In source build
chomp( $visitplugindir = `cat $visitdir/VERSION`);
chomp( $visitpluginver = `cat $visitdir/VERSION`);
}
if(-e "$visitdir/include/visit-config.h")
elsif(-e "$visitdir/include/visit-config.h")
{
# Out of source build
chomp( $verline = `grep VISIT_VERSION $visitdir/include/visit-config.h`);
chomp( $verline = `fgrep VISIT_VERSION $visitdir/include/visit-config.h`);
if($verline ne "")
{
$verline = substr($verline, 23, -1);
$verline =~ s/^.*\"(.*)\".*$/$1/;
}
$visitpluginver = $verline;
}
......
......@@ -53,6 +53,7 @@
#include <avtDatasetExaminer.h>
#include <avtHistogramSpecification.h>
#include <avtMetaData.h>
#include <avtNamedSelectionManager.h>
#include <avtParallel.h>
#include <avtTimeLoopCollectorFilter.h>
......@@ -680,8 +681,10 @@ CQFilter::GlobalizeSelection(
// sizes over all processors.
int nCellsTotal = (int)selection.size();
SumIntAcrossAllProcessors(nCellsTotal);
if(nCellsTotal > 1000000)
if(nCellsTotal > avtNamedSelectionManager::MaximumSelectionSize())
{
debug5 << "The number of total cells (" << nCellsTotal
<< ") is above the allowed limit." << endl;
return false;
}
......
......@@ -235,6 +235,8 @@ QvisHistogram::paintEvent(QPaintEvent *e)
QvisAbstractOpacityBar::paintEvent(e);
QPainter p(this);
// Draw selection lines
if(selectionEnabled)
{
// Now draw some indicator lines.
......@@ -255,6 +257,16 @@ QvisHistogram::paintEvent(QPaintEvent *e)
x, contentsRect().top() + contentsRect().height());
}
// If there is no data, draw "No data" string across the widget.
if(histTexture == 0)
{
p.setPen(Qt::white);
p.drawText(contentsRect().x(), contentsRect().y(),
contentsRect().width(), contentsRect().height(),
Qt::AlignCenter | Qt::AlignVCenter,
tr("No data"));
}
#if 0
// draw some axis titles
int fH = fontMetrics().boundingRect("Xj").height();
......
......@@ -1817,7 +1817,7 @@ QvisSelectionsWindow::histogramTypeChanged(int value)
}
Apply();
//UpdateHistogram();
UpdateHistogram(0,0,0,0,false); // invalidate the histogram
UpdateHistogramTitle();
cqHistogramVariableButton->setEnabled(!selectionProps.GetVariables().empty());
......
......@@ -282,7 +282,7 @@ SplashScreen::SplashScreen(bool cyclePictures)
<< tr("October")
<< tr("November")
<< tr("December");
int currentMonth = 4;
int currentMonth = 6;
lLayout->addWidget(new QLabel(versionText, this));
lLayout->addWidget(new QLabel(months[currentMonth-1] + " 2011", this));
......
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