edit command button tries to edit wrong command after a search
Bug #738264 reported by
Duane Hinnen
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CLI Companion |
Fix Released
|
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
lp:~bdfhjk/clicompanion/fix-738264
- Duane Hinnen: Approve
-
Diff: 200 lines (+96/-13)2 files modifiedclicompanionlib/controller.py (+85/-10)
clicompanionlib/view.py (+11/-3)
Changed in clicompanion: | |
importance: | Undecided → Medium |
Changed in clicompanion: | |
status: | New → Confirmed |
Changed in clicompanion: | |
status: | In Progress → Fix Committed |
Changed in clicompanion: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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