Ticket #2459: if active panel changed type from file listing to info, inactive panel is not become active.

How to reproduce:

1. Run mc.
2. Change both panels to listing modes.
3. Switch to the right panel.
4. Switch type of active right panel to info using menu.

Result: left panel is not active.
Expected result: left panel must become active.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2011-05-04 17:07:25 +04:00
parent 47115e97ad
commit 05ae0b187d
1 changed files with 7 additions and 4 deletions

View File

@ -191,6 +191,13 @@ do_select_widget (Dlg_head * h, GList * w, select_dir_t dir)
switch (dir)
{
case SELECT_EXACT:
h->current = g_list_find (h->widgets, w0);
if (dlg_focus (h))
return;
/* try find another widget that can take focus */
dir = SELECT_NEXT;
/* fallthrough */
case SELECT_NEXT:
h->current = g_list_next (h->current);
if (h->current == NULL)
@ -201,10 +208,6 @@ do_select_widget (Dlg_head * h, GList * w, select_dir_t dir)
if (h->current == NULL)
h->current = g_list_last (h->widgets);
break;
case SELECT_EXACT:
h->current = g_list_find (h->widgets, w0);
dlg_focus (h);
return;
}
}
while (h->current != w /* && (((Widget *) h->current->data)->options & W_DISABLED) == 0 */ );