Ticket #3663 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Panelize resets marks on marked files in many cases when it should not

Reported by: avallac_h Owned by: andrew_b
Priority: major Milestone: 4.8.18
Component: mc-core Version: 4.8.17
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

This happens after:

  • hiding panels with Ctrl-o
  • refreshing Panelize panel with Ctrl-r
  • launching an editor (no matter internal or external)
  • launching an external viewer
  • executing any shell command
  • performing any operation on opposite panel (copy, rename, link creation. etc.)
  • copying files from Panelize panel and choosing 'Don't overwrite' files on the opposite panel.

The last one is the most annoying: it leads to the situation when not all marked files have been copied, but you'll never find what files you are missing 'cause you've already loose everything you marked.

Steps to reproduce:

  1. Search files with any criteria using 'Find file'
  2. Select [Panelize]
  3. Mark some files with Ins or Ctrl-t
  4. Do anything mentioned from above

P.S. As for me, it seems that all of these cases can be bundled together because all mentioned operations call a 'do_refresh ()' function.

Attachments

3663-panelize-resets-marks-on-marked-files--v1.patch (1.6 KB) - added by mooffie 8 years ago.
3663-panelize-resets-marks-on-marked-files--v2.patch (1.6 KB) - added by mooffie 8 years ago.

Change History

comment:1 follow-up: ↓ 2 Changed 8 years ago by mooffie

Here's a patch (two, actually).

Patch "v1" is how I initially thought to fix this. It's easy to see the cause of the bug here (do_file_mark(), at some point in history after that code was written, was modified to assign to f.marked).

But when we examine how non-panelized panels reload, we see that they use recalculate_panel_summary(), and there's no reason not to choose this solution for panelized panels as well. That's patch "v2".

In short: use v2, not v1. (Although both work.)

Changed 8 years ago by mooffie

Changed 8 years ago by mooffie

comment:2 in reply to: ↑ 1 Changed 8 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.18

Replying to mooffie:

In short: use v2

Thanks!

Branch: 3663_panelize_keep_marked
changeset:d6aa2ff92411e7154088123904c535d3bcdd3f08

comment:3 Changed 8 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:4 Changed 8 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:5 Changed 8 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.