<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>320129</bug_id>
          
          <creation_ts>2013-05-22 10:36:15 +0000</creation_ts>
          <short_desc>JJ: Tracks cannot be dragged around when playlist was shuffled</short_desc>
          <delta_ts>2013-05-31 12:23:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>amarok</product>
          <component>Playlist</component>
          <version>2.7-git</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>junior-jobs</keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>2.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matěj Laitl">matej</reporter>
          <assigned_to name="Amarok Bugs">amarok-bugs-null</assigned_to>
          <cc>konrad.zemek</cc>
    
    <cc>teo</cc>
          
          <cf_commitlink>http://commits.kde.org/amarok/5659f0f8ad73a2894ebe8d5da3f7925e75ce6901</cf_commitlink>
          <cf_versionfixedin>2.8</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1370398</commentid>
    <comment_count>0</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-22 10:36:15 +0000</bug_when>
    <thetext>When you click Shuffle &quot;sorting&quot; in playlist sort widget, the tracks get shuffled, but you cannot move one track around in the playlist.

This is because the shuffle *action* is implementing as a *state*, which is IMO suboptimal. I suggest that we make the Shuffle an action instead. It would actually change track order of the bottom model of the playlist, not just *sorting* of the QSortFilterProxyModel.

Speaking about the ui, I think we can retain the Shuffle button in the playlist sorting panel, but it would just appear for a short interval upon clicking (0.5 a second? whatever looks good) and then disappear.

The action needs to be undoable using the playlist undo button.

Marking this as a junior job. Konrad, you&apos;ve previously touched this code, perhaps you&apos;d like to try this one, too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1370421</commentid>
    <comment_count>1</comment_count>
    <who name="Konrad Zemek">konrad.zemek</who>
    <bug_when>2013-05-22 11:41:19 +0000</bug_when>
    <thetext>Sure, I&apos;ll take a look at it once I have some free time (today maybe, friday at the latest).

Additionaly, a way to hint that the &quot;Shuffle&quot; entry works in a different way would be to place a separator between this entry and entries above... but that&apos;s just a minor detail. I&apos;m a bit torn about the button appearing, though. I think it may very well not show at all, as the effects of shuffing should be immediately visible anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1370423</commentid>
    <comment_count>2</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-22 11:48:17 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Sure, I&apos;ll take a look at it once I have some free time (today maybe, friday
&gt; at the latest).

No need to hurry. :)

&gt; Additionaly, a way to hint that the &quot;Shuffle&quot; entry works in a different way
&gt; would be to place a separator between this entry and entries above... but
&gt; that&apos;s just a minor detail.

Good idea.

&gt; I&apos;m a bit torn about the button appearing,
&gt; though. I think it may very well not show at all, as the effects of shuffing
&gt; should be immediately visible anyway.

You&apos;re right. Just try it locally and then submit what works better for your eye.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1371429</commentid>
    <comment_count>3</comment_count>
    <who name="Konrad Zemek">konrad.zemek</who>
    <bug_when>2013-05-27 00:20:50 +0000</bug_when>
    <thetext>https://git.reviewboard.kde.org/r/110658/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1372811</commentid>
    <comment_count>4</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-31 12:23:59 +0000</bug_when>
    <thetext>Git commit 5659f0f8ad73a2894ebe8d5da3f7925e75ce6901 by Matěj Laitl, on behalf of Konrad Zemek.
Committed on 31/05/2013 at 14:21.
Pushed by laitl into branch &apos;master&apos;.

Playlist sort widget: reimplement Shuffle &quot;sort&quot; as an action.

Remove now-unnecessary Shuffle handlers in sort-related functions.
Additionally, PlaylistController::moveRows() has been modified to help
with big move actions (validation complexity reduced).

Playlist::BreadcrumbItemMenu introduced to deduplicate logic between
Playlist::BreadcrumbItem and Playlist::BreadcrumbAddMenuButton.

GUI: In the playlist sort widget, the Shuffle menu entry is now
separated from other entries. Activating the entry no longer results in
a &quot;Shuffle&quot; sort level being added.
FIXED-IN: 2.8
REVIEW: 110658
CCMAIL: amarok-promo@kde.org

M  +1    -0    ChangeLog
M  +21   -0    src/playlist/PlaylistActions.cpp
M  +5    -0    src/playlist/PlaylistActions.h
M  +60   -64   src/playlist/PlaylistBreadcrumbItem.cpp
M  +56   -26   src/playlist/PlaylistBreadcrumbItem.h
M  +32   -47   src/playlist/PlaylistBreadcrumbItemSortButton.cpp
M  +1    -2    src/playlist/PlaylistBreadcrumbItemSortButton.h
M  +2    -27   src/playlist/PlaylistBreadcrumbLevel.cpp
M  +0    -1    src/playlist/PlaylistBreadcrumbLevel.h
M  +9    -7    src/playlist/PlaylistController.cpp
M  +12   -2    src/playlist/PlaylistController.h
M  +0    -4    src/playlist/PlaylistDefines.h
M  +8    -4    src/playlist/PlaylistModel.cpp
M  +20   -15   src/playlist/PlaylistSortWidget.cpp
M  +6    -1    src/playlist/PlaylistSortWidget.h
M  +4    -69   src/playlist/proxymodels/SortAlgorithms.cpp
M  +0    -22   src/playlist/proxymodels/SortAlgorithms.h
M  +0    -2    src/playlist/proxymodels/SortScheme.cpp
M  +24   -24   tests/playlist/TestPlaylistModels.cpp
M  +3    -1    tests/playlist/TestPlaylistModels.h

http://commits.kde.org/amarok/5659f0f8ad73a2894ebe8d5da3f7925e75ce6901</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>