mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
a few fixes
This commit is contained in:
@@ -97,10 +97,6 @@ PlaylistManager::show( const Tomahawk::playlist_ptr& playlist )
|
|||||||
if ( !m_loadedPlaylists.contains( playlist ) )
|
if ( !m_loadedPlaylists.contains( playlist ) )
|
||||||
{
|
{
|
||||||
playlist->resolve();
|
playlist->resolve();
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_loadedPlaylists << playlist;
|
m_loadedPlaylists << playlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,6 +55,11 @@ SourcesModel::flags( const QModelIndex& index ) const
|
|||||||
playlist_ptr playlist = indexToPlaylist( index );
|
playlist_ptr playlist = indexToPlaylist( index );
|
||||||
if ( !playlist.isNull() && playlist->author()->isLocal() )
|
if ( !playlist.isNull() && playlist->author()->isLocal() )
|
||||||
defaultFlags |= Qt::ItemIsEditable;
|
defaultFlags |= Qt::ItemIsEditable;
|
||||||
|
} else if ( indexType( index ) == DynamicPlaylistSource )
|
||||||
|
{
|
||||||
|
dynplaylist_ptr playlist = indexToDynamicPlaylist( index );
|
||||||
|
if ( !playlist.isNull() && playlist->author()->isLocal() )
|
||||||
|
defaultFlags |= Qt::ItemIsEditable;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
|
return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
|
||||||
|
@@ -376,7 +376,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
|||||||
{
|
{
|
||||||
o.state = QStyle::State_Enabled;
|
o.state = QStyle::State_Enabled;
|
||||||
|
|
||||||
if ( ( SourcesModel::indexType( index ) == SourcesModel::PlaylistSource || SourcesModel::indexType( index ) == SourcesModel::PlaylistSource ) &&
|
if ( ( SourcesModel::indexType( index ) == SourcesModel::PlaylistSource || SourcesModel::indexType( index ) == SourcesModel::DynamicPlaylistSource ) &&
|
||||||
( option.state & QStyle::State_Selected ) == QStyle::State_Selected )
|
( option.state & QStyle::State_Selected ) == QStyle::State_Selected )
|
||||||
{
|
{
|
||||||
o.palette.setColor( QPalette::Text, o.palette.color( QPalette::HighlightedText ) );
|
o.palette.setColor( QPalette::Text, o.palette.color( QPalette::HighlightedText ) );
|
||||||
|
Reference in New Issue
Block a user