From ab11d717067d466123495d7ffaed8166085c6d30 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 22 Aug 2008 08:52:00 +0000 Subject: [PATCH] It's correction for histogram item to convenient using of inheritance. --- src/Plot2d/Plot2d_HistogramItem.cxx | 2 +- src/Plot2d/Plot2d_HistogramItem.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Plot2d/Plot2d_HistogramItem.cxx b/src/Plot2d/Plot2d_HistogramItem.cxx index 5b503c714..9893c8a10 100644 --- a/src/Plot2d/Plot2d_HistogramItem.cxx +++ b/src/Plot2d/Plot2d_HistogramItem.cxx @@ -437,7 +437,7 @@ void Plot2d_HistogramItem::drawRectAndLowers( QPainter* thePainter, { QRect aRect = theRect; // theRect has inversed coordinates on Y axis. The top of the rect is bottom in standard QRect coordinates, and it bottom is the top. - if ( m_bCrossed && theOr == Qt::Horizontal ) + if ( m_bCrossed )//&& theOr == Qt::Horizontal ) aRect.setTop( getCrossedTop( theRect ) ); drawBar( thePainter, Qt::Horizontal, aRect ); diff --git a/src/Plot2d/Plot2d_HistogramItem.h b/src/Plot2d/Plot2d_HistogramItem.h index 37408a165..0e62a7293 100644 --- a/src/Plot2d/Plot2d_HistogramItem.h +++ b/src/Plot2d/Plot2d_HistogramItem.h @@ -87,11 +87,11 @@ public: void setCrossItems( const bool& theCross ) { m_bCrossed = theCross; } bool isCrossItems() const { return m_bCrossed; } -private: +protected: void drawRectAndLowers( QPainter* , Qt::Orientation, const QRect& ) const; int getCrossedTop( const QRect& ) const; -private: +protected: QList m_BarItems; bool m_bCrossed; }; -- 2.39.2