mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
* Prevent more than one SocialWidget showing up at a time.
This commit is contained in:
parent
caaec5c1c8
commit
2bb175860b
@ -600,10 +600,13 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||
void
|
||||
AudioControls::onSocialButtonClicked()
|
||||
{
|
||||
SocialWidget* sw = new SocialWidget( m_parent );
|
||||
sw->setPosition( sw->mapFromGlobal( QCursor::pos() ) );
|
||||
sw->setQuery( m_currentTrack->toQuery() );
|
||||
sw->show();
|
||||
if ( !m_socialWidget.isNull() )
|
||||
return;
|
||||
|
||||
m_socialWidget = new SocialWidget( m_parent );
|
||||
m_socialWidget.data()->setPosition( m_socialWidget.data()->mapFromGlobal( QCursor::pos() ) );
|
||||
m_socialWidget.data()->setQuery( m_currentTrack->toQuery() );
|
||||
m_socialWidget.data()->show();
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
class QDropEvent;
|
||||
class QDragEnterEvent;
|
||||
class QDragMoveEvent;
|
||||
class SocialWidget;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -91,6 +92,8 @@ private:
|
||||
void setSocialActions();
|
||||
|
||||
Ui::AudioControls* ui;
|
||||
|
||||
QWeakPointer<SocialWidget> m_socialWidget;
|
||||
|
||||
Tomahawk::result_ptr m_currentTrack;
|
||||
Tomahawk::PlaylistModes::RepeatMode m_repeatMode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user