Fix piano roll detuning redraw

This commit is contained in:
Lukas W
2015-01-12 11:03:49 +01:00
parent ae0ff4c65b
commit 58507c28ec

View File

@@ -1201,9 +1201,19 @@ void PianoRoll::mousePressEvent(QMouseEvent * me )
if( m_editMode == ModeEditDetuning && noteUnderMouse() )
{
static AutomationPattern* detuningPattern = nullptr;
if (detuningPattern != nullptr)
{
detuningPattern->disconnect(this);
}
Note* n = noteUnderMouse();
if (n->detuning() == NULL) n->createDetuning();
gui->automationEditor()->open( noteUnderMouse()->detuning()->automationPattern() );
if (n->detuning() == nullptr)
{
n->createDetuning();
}
detuningPattern = n->detuning()->automationPattern();
connect(detuningPattern, SIGNAL(dataChanged()), this, SLOT(update()));
gui->automationEditor()->open(detuningPattern);
return;
}