# HG changeset patch # User Chris Cannam # Date 1563452269 -3600 # Node ID aa0b56d72f2718545f70ba46c08441918fda9312 # Parent 85b9b466a59fb44841852965eeaaf3f24d2ed3c4 Ensure the right model ID gets sent with the signal for alignment changes diff -r 85b9b466a59f -r aa0b56d72f27 data/model/Model.cpp --- a/data/model/Model.cpp Wed Jul 17 14:24:51 2019 +0100 +++ b/data/model/Model.cpp Thu Jul 18 13:17:49 2019 +0100 @@ -47,17 +47,23 @@ if (auto model = ModelById::get(m_alignmentModel)) { disconnect(model.get(), SIGNAL(completionChanged(ModelId)), - this, SIGNAL(alignmentCompletionChanged(ModelId))); + this, SLOT(alignmentModelCompletionChanged(ModelId))); } m_alignmentModel = alignmentModel; if (auto model = ModelById::get(m_alignmentModel)) { connect(model.get(), SIGNAL(completionChanged(ModelId)), - this, SIGNAL(alignmentCompletionChanged(ModelId))); + this, SLOT(alignmentModelCompletionChanged(ModelId))); } } +void +Model::alignmentModelCompletionChanged(ModelId) +{ + emit alignmentCompletionChanged(getId()); +} + const ModelId Model::getAlignment() const { diff -r 85b9b466a59f -r aa0b56d72f27 data/model/Model.h --- a/data/model/Model.h Wed Jul 17 14:24:51 2019 +0100 +++ b/data/model/Model.h Thu Jul 18 13:17:49 2019 +0100 @@ -292,10 +292,14 @@ /** * Emitted when the completion percentage changes for the - * calculation of this model's alignment model. + * calculation of this model's alignment model. (The ModelId + * provided is that of this model, not the alignment model.) */ void alignmentCompletionChanged(ModelId myId); +private slots: + void alignmentModelCompletionChanged(ModelId); + protected: Model() : m_extendTo(0) { }