8000 Fix: Fixed Double Welcome to Faction Message for Mercenary Campaigns by IllianiBird · Pull Request #7299 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Fixed Double Welcome to Faction Message for Mercenary Campaigns #7299

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

Merged

Conversation

IllianiBird
Copy link
Collaborator

Just a minor conditional return statement missing. Easily fixed.

@IllianiBird IllianiBird self-assigned this Jul 6, 2025
@IllianiBird IllianiBird added the Bug label Jul 6, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner July 6, 2025 03:18
@IllianiBird IllianiBird added GUI Severity: Medium Issues described as medium severity as per the new issue form labels Jul 6, 2025
Copy link
codecov bot commented Jul 6, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 12.69%. Comparing base (6e47b9e) to head (039170c).
Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
.../src/mekhq/gui/dialog/CompanyGenerationDialog.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7299      +/-   ##
============================================
- Coverage     12.70%   12.69%   -0.02%     
+ Complexity     7575     7574       -1     
============================================
  Files          1166     1171       +5     
  Lines        149038   149162     +124     
  Branches      22867    22888      +21     
============================================
- Hits          18939    18936       -3     
- Misses       128067   128191     +124     
- Partials       2032     2035       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HammerGS HammerGS requested a review from Copilot July 6, 2025 22:48
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a duplication issue in the welcome message for Mercenary campaigns by adding a missing return in the confirmation action listener.

  • Adds an early return after launching a new mercenary organization to prevent the welcome message from firing twice.
  • Confirms that the pirate faction branch still returns immediately and skips further processing.
  • No other functional changes.
Comments suppressed due to low confidence (1)

MekHQ/src/mekhq/gui/dialog/CompanyGenerationDialog.java:161

  • [nitpick] Avoid using a hardcoded string literal for the Mercenary faction code; use a shared constant (e.g., MERC_FACTION_CODE) for consistency with the pirate branch.
        if (campaignFactionCode.equals("MERC")) {

Copy link
Collaborator
@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IllianiBird IllianiBird merged commit 6e83348 into MegaMek:master Jul 7, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GUI Severity: Medium Issues described as medium severity as per the new issue form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0