Skip to content

Commit c72cb8a

Browse files
authored
Merge pull request #16088 from daschuer/gh16075_2
Revert the removal of hotcue CO WOverview connection
2 parents b3ac98a + e5d207c commit c72cb8a

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/waveform/renderers/waveformmark.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ class WaveformMark {
6868
return m_pPositionCO && m_pPositionCO->valid();
6969
}
7070

71+
template<typename Receiver, typename Slot>
72+
void connectSamplePositionChanged(Receiver receiver, Slot slot) const {
73+
m_pPositionCO->connectValueChanged(receiver, slot, Qt::AutoConnection);
74+
};
75+
template<typename Receiver, typename Slot>
76+
void connectSampleEndPositionChanged(Receiver receiver, Slot slot) const {
77+
if (m_pEndPositionCO) {
78+
m_pEndPositionCO->connectValueChanged(receiver, slot, Qt::AutoConnection);
79+
}
80+
};
7181
double getSamplePosition() const {
7282
return m_pPositionCO->get();
7383
}

src/waveform/renderers/waveformmarkset.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ class WaveformMarkSet {
2929
const SkinContext& context,
3030
const WaveformSignalColors& signalColors);
3131

32+
template<typename Receiver, typename Slot>
33+
void connectSamplePositionChanged(Receiver receiver, Slot slot) const {
34+
for (const auto& pMark : std::as_const(m_marks)) {
35+
if (pMark->isValid()) {
36+
pMark->connectSamplePositionChanged(receiver, slot);
37+
}
38+
}
39+
};
40+
41+
template<typename Receiver, typename Slot>
42+
void connectSampleEndPositionChanged(Receiver receiver, Slot slot) const {
43+
for (const auto& pMark : std::as_const(m_marks)) {
44+
if (pMark->isValid()) {
45+
pMark->connectSampleEndPositionChanged(receiver, slot);
46+
}
47+
}
48+
};
49+
3250
template<typename Receiver, typename Slot>
3351
void connectVisibleChanged(Receiver receiver, Slot slot) const {
3452
for (const auto& pMark : std::as_const(m_marks)) {

src/widget/woverview.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ void WOverview::setup(const QDomNode& node, const SkinContext& context) {
192192
auto colorPalette = colorPaletteSettings.getHotcueColorPalette();
193193
m_pCueMenuPopup->setColorPalette(colorPalette);
194194

195+
m_marks.connectSamplePositionChanged(this, &WOverview::onMarkChanged);
196+
m_marks.connectSampleEndPositionChanged(this, &WOverview::onMarkChanged);
195197
m_marks.connectVisibleChanged(this, &WOverview::onMarkChanged);
196198

197199
QDomNode child = node.firstChild();

0 commit comments

Comments
 (0)