Skip to content

Commit

Permalink
Merge pull request #774 from austinmatherne-wk/fix-gui-save-viewer
Browse files Browse the repository at this point in the history
Fix GUI Save Viewer Exception
  • Loading branch information
derekgengenbacher-wf authored Dec 6, 2024
2 parents 0c82023 + a3df395 commit fc4e511
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion iXBRLViewerPlugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,19 @@ def iXBRLViewerSaveCommand(cntlr):
return
dialog = SaveViewerDialog(cntlr)
dialog.render()
features = {
feature: True
for feature in dialog.features()
}
pluginData(cntlr).builder = IXBRLViewerBuilder(cntlr, features=features)
processModel(cntlr, modelXbrl)
if dialog.accepted and dialog.filename():
generateViewer(
cntlr=cntlr,
saveViewerDest=dialog.filename(),
viewerURL=dialog.scriptUrl(),
copyScript=dialog.copyScript(),
zipViewerOutput=dialog.zipViewerOutput(),
features=dialog.features(),
)


Expand Down
12 changes: 6 additions & 6 deletions iXBRLViewerPlugin/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@
FeatureConfig(
key='search_on_startup',
label='Search on startup',
description='Show the search pane by default on startup',
description='Show the search pane by default on startup.',
cliAction='store_true',
cliDefault=None,
guiVisible=False,
guiDefault=None
guiVisible=True,
guiDefault=False
),
FeatureConfig(
key='highlight_facts_on_startup',
label='Highlight facts on startup',
description='Default "Highlight all facts" to on',
description='Default "Highlight all facts" to on.',
cliAction='store_true',
cliDefault=None,
guiVisible=False,
guiDefault=None
guiVisible=True,
guiDefault=False
)
]
GUI_FEATURE_CONFIGS = [c for c in FEATURE_CONFIGS if c.guiVisible]
Expand Down

0 comments on commit fc4e511

Please sign in to comment.