Commit 454893d8 authored by Julien Michel's avatar Julien Michel

Correction bug zoom arrière

parent ee4a452e
......@@ -138,8 +138,12 @@ ZoomableImageWidget<TPixel>
// otbMsgDebugMacro(<<"SetZoomFactor: newSize ->"<<newSize);
newRegion.SetIndex(m_ZoomUpperLeftCorner);
newRegion.SetSize(newSize);
this->SetViewedRegion(newRegion);
this->SetOpenGlIsotropicZoom(zoomFactor);
/// Bug correction, segfault zooming out too much
if(this->GetInput() && this->GetInput()->GetLargestPossibleRegion().IsInside(newRegion))
{
this->SetViewedRegion(newRegion);
this->SetOpenGlIsotropicZoom(zoomFactor);
}
}
/**
* Set a new zoom factor (>1).
......
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