diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index e2ff0bcd7..38cfe5057 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -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) diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index 4824b3eb9..f55bc9cb3 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -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;