Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ can be used to generate images from the command line without opening the plotter
```console
$ openmc-plotter -b view1.pltvw view1.pltvw view1.pltvw
```
## Troubleshooting

Updates to the plotter can result in stale references to deprecated features. For example, it's possible that something like the following may appear after an update:

```
AttributeError: 'MainWindow' object has no attribute 'shortcutOverlay'
```

To address this, the application settings can be cleared, the plotter can be started with the `--clear-config` (or `-c`) to reset the application's settings cache on startup.

```bash
$ openmc-plotter --clear-cache
```

## Features

Expand Down
6 changes: 6 additions & 0 deletions openmc_plotter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def main():
'XML files (default is current dir)')
ap.add_argument('-b', '--batch-mode', nargs='+', default=False,
help='View files used to generate plots in batch mode')
ap.add_argument('-c', '--clear-config', action='store_true', default=False,
help='Clear the Qt application configuration settings')

args = ap.parse_args()

Expand All @@ -45,6 +47,10 @@ def run_app(user_args):
app.setWindowIcon(QtGui.QIcon(path_icon))
app.setAttribute(QtCore.Qt.AA_DontShowIconsInMenus, True)

if user_args.clear_config:
settings = QtCore.QSettings()
settings.clear()

splash_pix = QtGui.QPixmap(path_splash)
splash = QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)
splash.setMask(splash_pix.mask())
Expand Down