bfishman / Docking-Port-Alignment-Indicator

Official repository of the DPAI mod for Kerbal Space Program
MIT License
20 stars 7 forks source link

DPAI toolbar icon remains on mainmenu #1

Closed mwerle closed 4 years ago

mwerle commented 4 years ago

A forum user has reported that the DPAI toolbar icon remains visible after returning to the main menu. Unsure whether this occurs with the stock toolbar or blizzy's toolbar, so some investigation is required.

In general, double-check the startup behaviour for this mod and ensure it only becomes active during flight scenes.

EDIT: User has confirmed they are using the Stock Toolbar.

mwerle commented 4 years ago

Confirmed, although not sure why - code limited to Flight Mode only.

Debugger won't attach (stupid corporate firewall so anal it even blocks local traffic) so will take a while to investigate.

DomiKamu commented 4 years ago

Hi, the user mwerle mentions in this issue, is... me. ;) Having tested 8.6.4.1 "debug" patch (over regular 8.6.4), "Always show in stock toolbar" checkbox is unchecked (I don't use Blizzy's toolbar), have done few tests, the app icon doesn't appears (but it was the same by using 8.6.4, doesn't appears immediatly, but appears... later). As I've replied in forum, perhaps it's the good way. Thanks.

mwerle commented 4 years ago

"Always show in stock toolbar" checkbox is unchecked

-> This was the old default. You need to delete the "config.xml" inside the DPAI folder to see the default settings. Full path: GameData\NavyFish\Plugins\Docking Port Alignment Indicator\PluginData\DockingPortAlignmentIndicator\config.xml

mwerle commented 4 years ago

Root cause of the issue seems to have been that callbacks were being added to GameEvents but not removed. Once the callback was attached several times, the logic restricting the button visibility to FLIGHT mode broke down.

mwerle commented 4 years ago

Fixed in v6.8.5.