Skip to content

Commit

Permalink
fixup! fixup! Effects/GUI: use std::opt<double> for neutralPointOnSca…
Browse files Browse the repository at this point in the history
…le()
  • Loading branch information
ronso0 committed Apr 29, 2024
1 parent f8d043a commit 813d92a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widget/wknobcomposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ void WKnobComposed::drawArc(QPainter* pPainter) {
arcPen.setCapStyle(m_arcPenCap);

pPainter->setPen(arcPen);
if (m_defaultAngle) {
if (m_defaultAngle.has_value()) {
// draw arc from default angle to current angle
pPainter->drawArc(m_rect,
static_cast<int>((90 - m_defaultAngle.value()) * 16),
static_cast<int>((m_dCurrentAngle - m_defaultAngle.value()) * -16));
static_cast<int>((90 - *m_defaultAngle) * 16),
static_cast<int>((m_dCurrentAngle - *m_defaultAngle) * -16));
} else if (m_arcUnipolar) {
if (m_arcReversed) {
// draw arc from maxAngle to current position
Expand Down

0 comments on commit 813d92a

Please sign in to comment.