change automation editor window title on rename automation pattern
This commit is contained in:
@@ -288,6 +288,9 @@ protected slots:
|
||||
void play();
|
||||
void stop();
|
||||
|
||||
private slots:
|
||||
void updateWindowTitle();
|
||||
|
||||
private:
|
||||
QAction* m_discreteAction;
|
||||
QAction* m_linearAction;
|
||||
|
||||
@@ -2318,6 +2318,7 @@ void AutomationEditorWindow::setCurrentPattern(AutomationPattern* pattern)
|
||||
if (pattern)
|
||||
{
|
||||
connect(pattern, SIGNAL(dataChanged()), this, SLOT(update()));
|
||||
connect( pattern, SIGNAL( dataChanged() ), this, SLOT( updateWindowTitle() ) );
|
||||
connect(pattern, SIGNAL(destroyed()), this, SLOT(clearCurrentPattern()));
|
||||
|
||||
connect(m_flipXAction, SIGNAL(triggered()), pattern, SLOT(flipX()));
|
||||
@@ -2394,3 +2395,14 @@ void AutomationEditorWindow::stop()
|
||||
{
|
||||
m_editor->stop();
|
||||
}
|
||||
|
||||
void AutomationEditorWindow::updateWindowTitle()
|
||||
{
|
||||
if ( m_editor->m_pattern == nullptr)
|
||||
{
|
||||
setWindowTitle( tr( "Automation Editor - no pattern" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
setWindowTitle( tr( "Automation Editor - %1" ).arg( m_editor->m_pattern->name() ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user