Skip to content

Commit

Permalink
fix #60746: bad symbol position on drag & drop
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed May 18, 2015
1 parent 669aea8 commit c988a85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions mscore/dragdrop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,13 @@ void ScoreView::dropEvent(QDropEvent* event)
if (el == 0 || el->type() == Element::Type::MEASURE) {
int staffIdx;
Segment* seg;
el = _score->pos2measure(pos, &staffIdx, 0, &seg, 0);
QPointF offset;
el = _score->pos2measure(pos, &staffIdx, 0, &seg, &offset);
if (el && el->type() == Element::Type::MEASURE) {
dragElement->setTrack(staffIdx * VOICES);
dragElement->setParent(seg);
if (applyUserOffset)
dragElement->setUserOff(pos - seg->canvasPos());
dragElement->setUserOff(offset);
score()->undoAddElement(dragElement);
}
else {
Expand Down
3 changes: 1 addition & 2 deletions mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,8 @@ void ScoreView::measurePopup(const QPoint& gpos, Measure* obj)
int staffIdx;
int pitch;
Segment* seg;
QPointF offset;

if (!_score->pos2measure(data.startMove, &staffIdx, &pitch, &seg, &offset))
if (!_score->pos2measure(data.startMove, &staffIdx, &pitch, &seg, 0))
return;
if (staffIdx == -1) {
qDebug("ScoreView::measurePopup: staffIdx == -1!");
Expand Down

0 comments on commit c988a85

Please sign in to comment.