|
From: Tapio V. <aa...@us...> - 2011-01-07 13:22:22
|
Module: editor
Branch: master
Commit: 09681a70907bdc778343912cfbe3c65a08491fad
Author: Tapio Vierros <tap...@gm...>
Date: Fri Jan 7 15:22:08 2011 +0200
Insta-update graph when manipulating.
---
notelabel.cc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/notelabel.cc b/notelabel.cc
index 355588c..38ff366 100644
--- a/notelabel.cc
+++ b/notelabel.cc
@@ -1,5 +1,6 @@
#include <QtGui>
#include "notelabel.hh"
+#include "notegraphwidget.hh"
namespace {
static const int text_margin = 12; // Margin of the label texts
@@ -82,12 +83,16 @@ void NoteLabel::resizeEvent(QResizeEvent *event)
void NoteLabel::mouseMoveEvent(QMouseEvent *event)
{
QToolTip::showText(event->globalPos(), getText(), this);
+
+ NoteGraphWidget* ngw = dynamic_cast<NoteGraphWidget*>(parent());
if (m_resizing != 0) {
if (m_resizing < 0)
setGeometry(x() + event->pos().x(), y(), width() - event->pos().x(), height());
else
resize(event->pos().x(), height());
+ if (ngw) ngw->updateNotes();
} else if (!m_hotspot.isNull()) {
move(pos() + event->pos() - m_hotspot);
+ if (ngw) ngw->updateNotes();
}
}
|