Don't follow process when selecting non-process-specific options

Disable the follow process logic in Action_pickFromVector(), when
selecting sort order or user filter, since they don't apply on specific
process.

Fix #856
This commit is contained in:
wangqr
2018-11-11 00:48:08 -05:00
parent 402e46bb82
commit da60309fc9
3 changed files with 18 additions and 13 deletions

View File

@ -93,7 +93,7 @@ static Htop_Reaction Platform_actionSetIOPriority(State* st) {
if (!p) return HTOP_OK;
IOPriority ioprio = p->ioPriority;
Panel* ioprioPanel = IOPriorityPanel_new(ioprio);
void* set = Action_pickFromVector(st, ioprioPanel, 21);
void* set = Action_pickFromVector(st, ioprioPanel, 21, true);
if (set) {
IOPriority ioprio = IOPriorityPanel_getIOPriority(ioprioPanel);
bool ok = MainPanel_foreachProcess((MainPanel*)panel, (MainPanel_ForeachProcessFn) LinuxProcess_setIOPriority, (Arg){ .i = ioprio }, NULL);