Skip to content

Commit

Permalink
fix issue #145, restore from db menu is stuck at disabled status when…
Browse files Browse the repository at this point in the history
… display changed
  • Loading branch information
kangyu-california committed Feb 17, 2022
1 parent 21787fe commit 7c82aff
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ public bool Start(bool auto_restore_from_db = false)
restoreHalted = false;
topmostWindowsFixed.Clear();

Log.Error("Restore aborted for {0}", curDisplayKey);
Log.Trace("Restore aborted for {0}", curDisplayKey);

// do restore again, while keeping previous capture time unchanged
curDisplayKey = displayKey;
if (normalSessions.Contains(curDisplayKey))
{
// do restore again, while keeping previous capture time unchanged
Log.Event("Restart restore for {0}", curDisplayKey);
restoringFromMem = true;
StartRestoreTimer();
Expand Down Expand Up @@ -483,10 +483,9 @@ public bool Start(bool auto_restore_from_db = false)
windowActiveCnt[curDisplayKey] = 0;

// change display on the fly
curDisplayKey = displayKey;

if (normalSessions.Contains(curDisplayKey))
if (normalSessions.Contains(displayKey))
{
curDisplayKey = displayKey;
if (promptSessionRestore)
{
PromptSessionRestore();
Expand All @@ -496,7 +495,8 @@ public bool Start(bool auto_restore_from_db = false)
}
else
{
Log.Error($"No need to restore {curDisplayKey} display session");
//Log.Error($"No need to restore {curDisplayKey} display session");
StartRestoreFinishedTimer(0);
}
}
}
Expand Down

0 comments on commit 7c82aff

Please sign in to comment.