From f0943ce393dbe7b888706d9f4f84b3fc2ae4c6b7 Mon Sep 17 00:00:00 2001
From: John Biddiscombe <biddisco@cscs.ch>
Date: Mon, 14 May 2012 16:19:24 +0200
Subject: [PATCH] Fix invalid bounds on painter initial render.

On First Render ComputeBounds can be called on a painter before input has been set.
Add a SetInput Call to the painter before updates to ensure it is able to
compute the correct bounds.

Change-Id: Iabccc4b618900d2491bfe5d1caa5879afd15cb10
---
 Rendering/vtkPainterPolyDataMapper.cxx |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Rendering/vtkPainterPolyDataMapper.cxx b/Rendering/vtkPainterPolyDataMapper.cxx
index 38bcba7..835e500 100644
--- a/Rendering/vtkPainterPolyDataMapper.cxx
+++ b/Rendering/vtkPainterPolyDataMapper.cxx
@@ -384,6 +384,7 @@ void vtkPainterPolyDataMapper::ComputeBounds()
     if (this->PainterUpdateTime < this->GetMTime())
       {
       this->UpdatePainterInformation();
+      painter->SetInput(this->GetInput());
       this->PainterUpdateTime.Modified();
       }
     painter->UpdateBounds(this->Bounds);
-- 
1.7.3.1.msysgit.0

