|
From: Tapio V. <aa...@us...> - 2011-02-02 13:52:38
|
Module: editor
Branch: master
Commit: d299b0ffe37673f117bcd8b441c408c4f4fa9b5d
Author: Tapio Vierros <tap...@gm...>
Date: Wed Feb 2 15:51:57 2011 +0200
Fix segfault in timeCurrent().
---
notegraphwidget.cc | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 3c841e1..83b1bbe 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -262,8 +262,9 @@ void NoteGraphWidget::timeCurrent()
{
if (m_selectedNote) {
Operation op("MOVE");
- op << px2s(m_seekHandle.curx()) << px2s(m_seekHandle.curx() + m_selectedNote->width())
- << int(round(px2n(m_selectedNote->y() + m_noteHalfHeight))) + 1;
+ op << getNoteLabelId(m_selectedNote)
+ << px2s(m_seekHandle.curx()) << px2s(m_seekHandle.curx() + m_selectedNote->width())
+ << int(round(px2n(m_selectedNote->y() + m_noteHalfHeight))) + 1;
doOperation(op);
}
}
@@ -371,7 +372,7 @@ void NoteGraphWidget::mouseReleaseEvent(QMouseEvent *event)
if (m_actionHappened) {
// Operation for undo stack & saving
Operation op("MOVE");
- op << getNoteLabelId(n)
+ op << getNoteLabelId(n)
<< px2s(n->x()) << px2n(n->x() + n->width())
<< int(round(px2n(n->y() + m_noteHalfHeight)));
doOperation(op, Operation::NO_EXEC);
|