Ticket #3663 (closed defect: fixed)

Opened 16 months ago

Last modified 15 months 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.

Change History

comment:1 follow-up: ↓ 2 Changed 16 months 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 16 months ago by mooffie

Changed 16 months ago by mooffie

comment:2 in reply to: ↑ 1 Changed 15 months ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • 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 15 months ago by andrew_b

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

comment:4 Changed 15 months 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 15 months ago by andrew_b

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