Skip to content

Commit

Permalink
connect slots in init
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB authored and m0dB committed Nov 2, 2024
1 parent eccd575 commit 5b24afc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/qml/qmlwaveformrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ QmlWaveformRendererFactory::Renderer QmlWaveformRendererMark::create(
pMark->color(),
});
}
renderer->finishSetup();
return QmlWaveformRendererFactory::Renderer{renderer, renderer};
}
} // namespace qml
Expand Down
1 change: 1 addition & 0 deletions src/waveform/renderers/allshader/waveformrendermark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ void allshader::WaveformRenderMark::draw(QPainter* painter, QPaintEvent* event)
bool allshader::WaveformRenderMark::init() {
m_pTimeRemainingControl = std::make_unique<ControlProxy>(
m_waveformRenderer->getGroup(), "time_remaining");
::WaveformRenderMarkBase::init();
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/waveform/renderers/waveformrendermarkbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ WaveformRenderMarkBase::WaveformRenderMarkBase(
void WaveformRenderMarkBase::setup(const QDomNode& node, const SkinContext& context) {
WaveformSignalColors signalColors = *m_waveformRenderer->getWaveformSignalColors();
m_marks.setup(m_waveformRenderer->getGroup(), node, context, signalColors);
finishSetup();
}

void WaveformRenderMarkBase::finishSetup() {
bool WaveformRenderMarkBase::init() {
m_marks.connectSamplePositionChanged(this, &WaveformRenderMarkBase::onMarkChanged);
m_marks.connectSampleEndPositionChanged(this, &WaveformRenderMarkBase::onMarkChanged);
m_marks.connectVisibleChanged(this, &WaveformRenderMarkBase::onMarkChanged);
return true;
}

void WaveformRenderMarkBase::onSetTrack() {
Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/waveformrendermarkbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class WaveformRenderMarkBase : public QObject, public WaveformRendererAbstract {

void setup(const QDomNode& node, const SkinContext& context) override;

void finishSetup();
bool init() override;

// Called when a new track is loaded.
void onSetTrack() override;
Expand Down

0 comments on commit 5b24afc

Please sign in to comment.