Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always switch to progress tab when starting a [re/un]install #2351

Merged
merged 1 commit into from
Mar 17, 2018

Conversation

HebaruSan
Copy link
Member

Problem

If you:

  1. Already have some mods installed via CKAN
  2. Launch the CKAN GUI
  3. Right click an installed mod
  4. Choose "Reinstall"
  5. Click Yes

... then the progress tab does not display. Instead only the status bar reports progress. Additional odd behaviors and glitches may be observed after this as well.

If you install a mod normally first (before step 3), then it works as expected.

Cause

The sequence of calls needed to use the install flow correctly was:

CKAN/GUI/Main.cs

Lines 971 to 977 in 624839f

installWorker.RunWorkerAsync(
new KeyValuePair<List<ModChange>, RelationshipResolverOptions>(
fullChangeSet,
install_ops
)
);
ShowWaitDialog();

Previously, the ShowWaitDialog call was missing from reinstallToolStripMenuItem_Click. This call creates or activates the progress tab, depending on whether it already exists, and also does some initialization of the progress bar.

Changes

Now the ShowWaitDialog call is moved to InstallMods, which is the function that RunWorkerAsync calls to do its work. This simplifies the code for installing/uninstalling/reinstalling and fixes the reinstall flow.

Fixes #2343.

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Pull request and removed Bug Something is not working as intended labels Mar 8, 2018
@Olympic1 Olympic1 merged commit acf2d11 into KSP-CKAN:master Mar 17, 2018
@HebaruSan HebaruSan deleted the fix/reinstall-progress branch March 17, 2018 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right-click - reinstall doesn't show progress
2 participants