gui/wxpython: dynamically check GRASS_ADDON_BASE for newly installed modules#7642
gui/wxpython: dynamically check GRASS_ADDON_BASE for newly installed modules#7642ArthPatel1502 wants to merge 1 commit into
Conversation
echoix
left a comment
There was a problem hiding this comment.
Do you know what « command » will look like when running on windows? Would it we found on these paths?
|
Please note that users may be able to install AddOns system wide with |
|
Thank you both for the excellent feedback! @echoix Regarding Windows: @ninsbl Good catch on the system-wide I will update the implementation block to include these fallback paths and push the updated commit shortly! |
…eo#7241) * backward compatibility for curly braces * map variable replacement on Display change --------- Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com> Co-authored-by: Martin Landa <landa.martin@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
4371fb9 to
6979012
Compare
Description
This PR resolves issue #7483 where a newly installed addon fails to open its wxGUI dialog window during the same session on macOS.
Root Cause
When the wxGUI initializes,
globalvar.grassCmdcaches the list of available GRASS commands. Runningg.extensionmid-session installs the binary correctly, but the string list cache is never refreshed. Because the command evaluates toFalseagainst the staleglobalvar.grassCmdlist, it defaults to background CLI execution instead of openingGUI().ParseCommand().Forcing the tool with
--uiruns it as an isolated process detached from the layer manager framework, triggering subsequentNotImplementedErrorfailures when trying to fetch coordinates via the selection cursor.Fix
Added a non-intrusive dynamic check using
shutil.whichinsideGConsole.RunCmd. If an executed command isn't tracked inside the startupglobalvar.grassCmdcache, it actively looks inside the live environment'sGRASS_ADDON_BASE/binorscriptsfolders. If discovered, it updates the runtime cache pool on the fly so the dialog wrapper intercepts and builds the GUI interface seamlessly.