added restoring last level set when interactively uploading tapes to server
authorHolger Schemel <info@artsoft.org>
Mon, 20 Sep 2021 18:47:20 +0000 (20:47 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 20 Sep 2021 18:47:20 +0000 (20:47 +0200)
src/tape.c

index ef7e8a5ab942f1c457c41a9b3328c57b818efaa4..d5d07236ea392c22910f4e17c0845f216b3c5819 100644 (file)
@@ -1464,6 +1464,7 @@ static int AutoPlayTapesExt(boolean initialize)
 
     -1
   };
+  LevelDirTree *leveldir_current_last = leveldir_current;
   boolean init_level_set = FALSE;
   int i;
 
@@ -1856,6 +1857,9 @@ static int AutoPlayTapesExt(boolean initialize)
   if (program.headless)
     CloseAllAndExit(0);
 
+  // when running interactively, restore last selected level set
+  leveldir_current = leveldir_current_last;
+
   return num_tapes;
 }