------------------------------------------------------------------------------
| 198 | |
| 199 | //------------------------------------------------------------------------------ |
| 200 | void vtkPlotBox::SetInputData(vtkTable* table) |
| 201 | { |
| 202 | if (table == this->Data->GetInput() && (!table || table->GetMTime() < this->BuildTime)) |
| 203 | { |
| 204 | return; |
| 205 | } |
| 206 | |
| 207 | this->vtkPlot::SetInputData(table); |
| 208 | |
| 209 | bool updateVisibility = table != this->Data->GetInput(); |
| 210 | vtkChartBox* parent = vtkChartBox::SafeDownCast(this->Parent); |
| 211 | |
| 212 | if (parent && table && updateVisibility) |
| 213 | { |
| 214 | parent->SetColumnVisibilityAll(false); |
| 215 | // By default make the first 10 columns visible in a plot. |
| 216 | for (vtkIdType i = 0; i < table->GetNumberOfColumns() && i < 10; ++i) |
| 217 | { |
| 218 | parent->SetColumnVisibility(table->GetColumnName(i), true); |
| 219 | } |
| 220 | } |
| 221 | else if (parent && updateVisibility) |
| 222 | { |
| 223 | // No table, therefore no visible columns |
| 224 | parent->GetVisibleColumns()->SetNumberOfTuples(0); |
| 225 | } |
| 226 | // Create a default lookup table is non set yet |
| 227 | if (!this->LookupTable) |
| 228 | { |
| 229 | this->CreateDefaultLookupTable(); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | //------------------------------------------------------------------------------ |
| 234 | namespace |
nothing calls this directly
no test coverage detected