Fix rearranging items in places panel with hidden items
ClosedPublic

Authored by tigrang on Mar 20 2019, 5:11 AM.

Details

Summary

m_sourceModel->movePlace is called using index from the view model.
This becomes an issue when there are hidden places items.

This change calls m_sourceModel->movePlace using the corresponding mapped source index.

BUG: 399430
FIXED-IN: 19.04.0

Test Plan
  1. Create at least 4 Places items
  2. Hide first item
  3. Drag the now first visible item between second and third item

Actual: The item does not move
Expected: The first visible item should now be second visible item in the list

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tigrang created this revision.Mar 20 2019, 5:11 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptMar 20 2019, 5:11 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
tigrang requested review of this revision.Mar 20 2019, 5:11 AM
tigrang added a reviewer: Dolphin.
ngraham accepted this revision.Mar 20 2019, 9:24 AM
ngraham retitled this revision from Fixes #399430 - Dolphin: Places: Regression: Move items up/down not working properly to Fix rearranging items in places panel with hidden items.
ngraham edited the summary of this revision. (Show Details)
ngraham added a subscriber: ngraham.

Thanks very much for the patch. This fixes the issue! Very nice first contribution.

Can you provide your full name and email address so we can merge it with correct authorship information?

This revision is now accepted and ready to land.Mar 20 2019, 9:25 AM

Thank you @ngraham

Full name: Tigran Gabrielyan
Email: tigrangab@gmail.com

This revision was automatically updated to reflect the committed changes.