Ticket #2390: file list format of panel is intialized incorrectly

...after switch panel back from quick view or info mode to file list one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2011-01-14 13:54:51 +03:00
parent 86d57f2569
commit c7fdc8f95b
2 changed files with 13 additions and 2 deletions

View File

@ -1060,10 +1060,15 @@ set_display_type (int num, panel_view_mode_t type)
if (type == view_listing)
{
WPanel *panel = (WPanel *) new_widget;
if (num == 0)
left_panel = (WPanel *) new_widget;
left_panel = panel;
else
right_panel = (WPanel *) new_widget;
right_panel = panel;
/* forced update format after set new sizes */
set_panel_formats (panel);
}
if (type == view_tree)

View File

@ -3451,6 +3451,12 @@ panel_update_cols (Widget * widget, int frame_size)
{
int cols, origin;
/* don't touch panel if it is not in dialog yet */
/* if panel is not in dialog it is not in widgets list
and cannot be compared with get_panel_widget() result */
if (widget->owner == NULL)
return;
if (horizontal_split)
{
widget->cols = COLS;