Skip to content

Commit

Permalink
fix #35231
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Nov 24, 2014
1 parent 6df0cd7 commit 8915f75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions mscore/dragdrop.cpp
Expand Up @@ -160,25 +160,25 @@ void ScoreView::setViewRect(const QRectF& r)
// pos is in canvas coordinates
//---------------------------------------------------------

bool ScoreView::dragTimeAnchorElement(const QPointF& pos)
void ScoreView::dragTimeAnchorElement(const QPointF& pos)
{
int staffIdx;
Segment* seg;
MeasureBase* mb = _score->pos2measure(pos, &staffIdx, 0, &seg, 0);
if (mb && mb->type() == Element::Type::MEASURE) {
int track = staffIdx * VOICES;
if (mb && mb->type() == Element::Type::MEASURE && seg->element(track)) {
Measure* m = static_cast<Measure*>(mb);
System* s = m->system();
qreal y = s->staff(staffIdx)->y() + s->pos().y() + s->page()->pos().y();
QPointF anchor(seg->canvasBoundingRect().x(), y);
setDropAnchor(QLineF(pos, anchor));
dragElement->score()->addRefresh(dragElement->canvasBoundingRect());
dragElement->setTrack(staffIdx * VOICES);
dragElement->setTrack(track);
dragElement->score()->addRefresh(dragElement->canvasBoundingRect());
return true;
return;
}
dragElement->score()->addRefresh(dragElement->canvasBoundingRect());
setDropTarget(0);
return false;
}

//---------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion mscore/scoreview.h
Expand Up @@ -211,7 +211,7 @@ class ScoreView : public QWidget, public MuseScoreView {

void setShadowNote(const QPointF&);
void drawElements(QPainter& p,const QList<Element*>& el);
bool dragTimeAnchorElement(const QPointF& pos);
void dragTimeAnchorElement(const QPointF& pos);
void dragSymbol(const QPointF& pos);
bool dragMeasureAnchorElement(const QPointF& pos);
void updateGrips();
Expand Down

0 comments on commit 8915f75

Please sign in to comment.