Bug 149263 - dynamic playlist mode: can't move a song to the first position in playlist
Summary: dynamic playlist mode: can't move a song to the first position in playlist
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.6
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-27 15:02 UTC by Emilio Scalise
Modified: 2007-08-27 16:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Scalise 2007-08-27 15:02:24 UTC
Version:           1.4.6 (using KDE 3.5.7, Debian Package 4:3.5.7.dfsg.1-1 (4.0))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.21-5-pm

This issue is a bit difficult to describe. I'll explain you the steps that reproduce this bug:
- start with an empty amarok playsting
- load a dynamic playlist, fox example casual mix
- try to move a song from a position different than the first song, to the first row using the mouse.
You can only position it on the second row.

Perhaps you can obtain the desidered behaviour double clicking on the song that you want to be played first. Perhaps, if I can move it with the mouse, why I can't move it to the first row?

Notice that in this test case there are no recently played songs on the playlist (I loaded a dynamic playlist, from an empty playlist).

Thanks,
Emilio
Comment 1 Jeff Mitchell 2007-08-27 16:15:23 UTC
SVN commit 705231 by mitchell:

Fix issue where immediately after activating a dynamic playlist you couldn't drag a track to the top.

BUG: 149263


 M  +2 -0      ChangeLog  
 M  +2 -1      src/playlist.cpp  


--- branches/stable/extragear/multimedia/amarok/ChangeLog #705230:705231
@@ -4,6 +4,8 @@
 
 VERSION 1.4.8
   BUGFIXES:
+    * Immediately after loading a dynamic playlist, you couldn't drag a
+      track to the top of the playlist. (BR 149263)
     * Fix transferring files with UTF8 names to MTP devices. Thanks to Kevin
       Becker <kevman3000@gmail.com> for the fix. (BR 139722)
     * Display warning that iPod sysinfo could not be written in the case of
--- branches/stable/extragear/multimedia/amarok/src/playlist.cpp #705230:705231
@@ -2424,7 +2424,8 @@
     //at the beginning or in the middle of the disabled tracks
     //Also, that the dynamic playlist has any tracks (suggested may not)
     if( dynamicMode() && Playlist::instance()->firstChild() &&
-            ( !m_marker || !( static_cast<PlaylistItem *>(m_marker)->isDynamicEnabled() )  ) )
+            ( !m_marker || !( static_cast<PlaylistItem *>(m_marker)->isDynamicEnabled() )  ) && 
+            currentTrackIndex() != -1 )
     {
         // If marker is disabled, and there is a current track, or marker is not the last enabled track
         // don't allow inserting