@@ -266,28 +266,35 @@ dialog_switch_list (void)
266
266
int
267
267
dialog_switch_process_pending (void )
268
268
{
269
+ WDialog * h = DIALOG (mc_current -> data );
269
270
int ret = 0 ;
270
271
271
- while ( dialog_switch_pending )
272
+ if (! dialog_switch_pending )
272
273
{
273
- WDialog * h = DIALOG (mc_current -> data );
274
- Widget * wh = WIDGET (h );
275
-
276
- dialog_switch_pending = FALSE;
277
- widget_set_state (wh , WST_SUSPENDED , TRUE);
278
- ret = dlg_run (h );
279
- if (widget_get_state (wh , WST_CLOSED ))
274
+ // return to panels and reload them forced
275
+ if (mc_global .mc_run_mode == MC_RUN_FULL && h == filemanager )
276
+ mc_event_raise (MCEVENT_GROUP_FILEMANAGER , "update_panels" , NULL );
277
+ }
278
+ else
279
+ while (dialog_switch_pending )
280
280
{
281
- widget_destroy ( wh );
281
+ Widget * wh = WIDGET ( h );
282
282
283
- // return to panels
284
- if (mc_global .mc_run_mode == MC_RUN_FULL )
283
+ dialog_switch_pending = FALSE;
284
+ widget_set_state (wh , WST_SUSPENDED , TRUE);
285
+ ret = dlg_run (h );
286
+ if (widget_get_state (wh , WST_CLOSED ))
285
287
{
286
- mc_current = g_list_find (mc_dialogs , filemanager );
287
- mc_event_raise (MCEVENT_GROUP_FILEMANAGER , "update_panels" , NULL );
288
+ widget_destroy (wh );
289
+
290
+ // return to panels
291
+ if (mc_global .mc_run_mode == MC_RUN_FULL )
292
+ {
293
+ mc_current = g_list_find (mc_dialogs , filemanager );
294
+ mc_event_raise (MCEVENT_GROUP_FILEMANAGER , "update_panels" , NULL );
295
+ }
288
296
}
289
297
}
290
- }
291
298
292
299
repaint_screen ();
293
300
0 commit comments