diff options
author | Harshit Maurya <hmaurya999@gmail.com> | 2020-05-14 04:58:34 +0530 |
---|---|---|
committer | Harshit Maurya <hmaurya999@gmail.com> | 2020-05-16 02:17:43 +0530 |
commit | 2918486a06858b5dd9df214348cd3682af7c868d (patch) | |
tree | 76fef7c0765a9bea0720ab2cacc237ae56556cf1 | |
parent | e1f13291d29f70d12668972eca82bd7a27680603 (diff) |
waveformrendermark: cleaner rectangle initialisation
-rw-r--r-- | src/waveform/renderers/waveformrendermark.cpp | 5 | ||||
-rw-r--r-- | src/waveform/waveformmarklabel.h | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/waveform/renderers/waveformrendermark.cpp b/src/waveform/renderers/waveformrendermark.cpp index 1c1f9d02d8..494df752c4 100644 --- a/src/waveform/renderers/waveformrendermark.cpp +++ b/src/waveform/renderers/waveformrendermark.cpp @@ -226,10 +226,7 @@ void WaveformRenderMark::generateMarkImage(WaveformMarkPointer pMark) { labelRect.moveBottom(height - 1); } - pMark->m_label.setAreaRect(QRectF(labelRect.left(), - labelRect.top(), - labelRectWidth, - labelRectHeight)); + pMark->m_label.setAreaRect(labelRect); // Fill with transparent pixels pMark->m_image.fill(QColor(0, 0, 0, 0).rgba()); diff --git a/src/waveform/waveformmarklabel.h b/src/waveform/waveformmarklabel.h index 4b4d848733..e3a588a49b 100644 --- a/src/waveform/waveformmarklabel.h +++ b/src/waveform/waveformmarklabel.h @@ -27,7 +27,7 @@ class WaveformMarkLabel { return m_areaRect; }; - void setAreaRect(const QRectF& areaRect) { + void setAreaRect(QRectF areaRect) { m_areaRect = areaRect; } |