Show the names of patterns in their tool tip
Adjust PatternView::update to show the name of the pattern as the tool tip (regardless of whether it is a beat and bassline or a melody pattern). Override the public slot TrackContentObjectView::update for AutomationPatternView and BBTCOView. Implement it similar to PatternView::update.
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
||||
public slots:
|
||||
/// Opens this view's pattern in the global automation editor
|
||||
void openInAutomationEditor();
|
||||
virtual void update();
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
@@ -98,6 +98,8 @@ public:
|
||||
}
|
||||
void setColor( QColor _new_color );
|
||||
|
||||
public slots:
|
||||
virtual void update();
|
||||
|
||||
protected slots:
|
||||
void openInBBEditor();
|
||||
|
||||
@@ -55,8 +55,7 @@ AutomationPatternView::AutomationPatternView( AutomationPattern * _pattern,
|
||||
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
||||
|
||||
ToolTip::add( this, tr( "double-click to open this pattern in "
|
||||
"automation editor" ) );
|
||||
ToolTip::add(this, m_pat->name());
|
||||
setStyle( QApplication::style() );
|
||||
|
||||
if( s_pat_rec == NULL ) { s_pat_rec = new QPixmap( embed::getIconPixmap(
|
||||
@@ -81,6 +80,13 @@ void AutomationPatternView::openInAutomationEditor()
|
||||
}
|
||||
|
||||
|
||||
void AutomationPatternView::update()
|
||||
{
|
||||
ToolTip::add(this, m_pat->name());
|
||||
|
||||
TrackContentObjectView::update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AutomationPatternView::resetName()
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "RenameDialog.h"
|
||||
#include "Song.h"
|
||||
#include "SongEditor.h"
|
||||
#include "ToolTip.h"
|
||||
#include "TrackLabelButton.h"
|
||||
|
||||
|
||||
@@ -381,6 +382,12 @@ void BBTCOView::setColor( QColor new_color )
|
||||
}
|
||||
|
||||
|
||||
void BBTCOView::update()
|
||||
{
|
||||
ToolTip::add(this, m_bbTCO->name());
|
||||
|
||||
TrackContentObjectView::update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -652,16 +652,7 @@ PatternView::~PatternView()
|
||||
|
||||
void PatternView::update()
|
||||
{
|
||||
if ( m_pat->m_patternType == Pattern::BeatPattern )
|
||||
{
|
||||
ToolTip::add( this,
|
||||
tr( "use mouse wheel to set velocity of a step" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ToolTip::add( this,
|
||||
tr( "double-click to open in Piano Roll" ) );
|
||||
}
|
||||
ToolTip::add(this, m_pat->name());
|
||||
|
||||
TrackContentObjectView::update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user