From 26f468c0619a21b1376f7a73207a25a38f1e0c38 Mon Sep 17 00:00:00 2001 From: san Date: Thu, 22 Dec 2005 16:20:30 +0000 Subject: [PATCH] Rolling back protection against crash in logarithmic scale --- src/Plot2d/Plot2d_ViewFrame.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 6d8546d35..ee25b1fd1 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -597,6 +597,15 @@ void Plot2d_ViewFrame::displayCurve( Plot2d_Curve* curve, bool update ) { if ( !curve ) return; + + // san -- Protection against QwtCurve bug in Qwt 0.4.x: + // it crashes if switched to X/Y logarithmic mode, when one or more points have + // non-positive X/Y coordinate + if ( myXMode && curve->getMinX() <= 0. ) + setHorScaleMode( 0, false ); + if ( myYMode && curve->getMinY() <= 0. ) + setVerScaleMode( 0, false ); + if ( hasCurve( curve ) ) { updateCurve( curve, update ); } -- 2.39.2