Skip to content

Commit

Permalink
Rename parameter 'rect' to 'canvasRect' in draw method.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Jan 14, 2025
1 parent 1cf337b commit b079c8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/qwtble/NotchedMarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class QWTBLE_EXPORT NotchedMarker : public QwtPlotItem
int rtti() const override;

void draw(QPainter* painter, const QwtScaleMap& xMap,
const QwtScaleMap& yMap, const QRectF& rect) const override;
const QwtScaleMap& yMap, const QRectF& canvasRect) const override;

/// @brief Activate or disable drawing of legend.
/// @param drawLegend Draw legend. True for drawing, false for not drawing.
Expand Down
5 changes: 3 additions & 2 deletions src/NotchedMarker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ NotchedMarker::NotchedMarker(QVector<Quantiles> quantiles)
int NotchedMarker::rtti() const { return QwtPlotItem::Rtti_PlotUserItem; }

void NotchedMarker::draw(QPainter* painter, const QwtScaleMap& xMap,
const QwtScaleMap& yMap, const QRectF& rect) const
const QwtScaleMap& yMap,
const QRectF& canvasRect) const
{
if (quantilesVector_.empty() ||
plot()->axisScaleDiv(QwtPlot::yLeft).isEmpty())
Expand All @@ -32,7 +33,7 @@ void NotchedMarker::draw(QPainter* painter, const QwtScaleMap& xMap,
painter->save();
painter->setBrush(QBrush(Qt::red, Qt::NoBrush));
if (drawLegend_)
drawLegend(painter, rect);
drawLegend(painter, canvasRect);
drawElements(painter, xMap, yMap);
painter->restore();
}
Expand Down

0 comments on commit b079c8e

Please sign in to comment.