edit command button tries to edit wrong command after a search

Reported by Duane Hinnen on 2011-03-19
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
CLI Companion
Medium
Unassigned

Bug Description

After you perform a search and try and edit a command, it pulls up the wrond command. The command that appears in the dialog is not the command you highlighted in the command list.

What should happen is when you highlight a command and click edit, the command that appears in the Edit dialog should be the command you selected before clicking edit.

To Reproduce:
expand the command list
enter a search in the search bar. i.e free
Then highlight a command. i.e free -m
The edit dialog opens to edit the command. However it is the wrong command. i.e. Not the free-m command

It looks like it is pulling up the command from the un filtered command list. The list from before the search.

Related branches

Changed in clicompanion:
importance: Undecided → Medium
Changed in clicompanion:
status: New → Confirmed
Marek Bardoński (bdfhjk) wrote :

I blocked accidentaly edit/remove not necessary command in my branch

Reason of bug:

controller.py:
193: row_int = int(view.ROW[0][0])

and
remove.py
293: row_int = int(view.ROW[0][0]) #convert pathlist into something usable

in this line program assigned to this variable number of row in filtered view. But in

remove.py
298: del cheatlines[row_int]

program deleted line in not filtered order, by index of filtered view row

My proposition for fix:
- if we have filtered view, firstly search in CHEATSHEET corresponding row_int in non-filtered view

Changed in clicompanion:
status: Confirmed → In Progress
Changed in clicompanion:
status: In Progress → Fix Committed
David Caro (dcaro) on 2011-12-31
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers