Repository navigation
mcgui: template folder handling, monkey-test crash fixes, app icon; mcplot/mcdisplay fixes - #2942
Merged
Merged
Conversation
The save-file dialog made an existing template folder unselectable (typing its name navigates into it), forcing users to invent a new folder name. Now a folder dialog picks the parent; if the template folder already exists the user can open it, make a numbered new copy (_2, _3, ...), or replace it with the template. Copies now include subfolders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ignore Compile while a compile is running (replacing the running QThread aborted the application) - Cancel Run if the instrument is closed/changed while mcrun --info runs, and ignore Run when no instrument is loaded - Validate ray count and random seed in the Run dialog - Fix off-by-one in the Run dialog "inspect" component lookup (picked the next component, IndexError on the last one) - Save As with no instrument loaded: return instead of UnboundLocalError - Show an error instead of raising when a component header can't be parsed - Configuration: keep GUICOLS/GUIFONTSIZE unless a positive integer is given - "Set as default": remove stray trailing comma that made the answer a tuple Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cone (McStas and McXtrace) lacked %D; SpinWave_BCO and Union_NCrystal_material lacked %E. mccodelib's ComponentParser requires both, so mcgui's Insert-component dialog failed on these. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- matplotlib mcplot/mcdisplay: numbered re-saves used the format without
its dot ("mcplot_1pdf"), so savefig wrote a PNG named mcplot_1pdf.png
and kept overwriting it
- mcplot-matplotlib: ignore clicks on non-panel axes (colorbars) instead
of raising ValueError from subplts.index()
- mcplot-pyqtgraph: ignore clicks whose target item was deleted by a
replot (RuntimeError)
- mcplot-pyqtgraph: report SVG export failure (pyqtgraph 0.14.0 can't
parse Qt 6.11's SVG path output) instead of a traceback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sets the already-installed <flavour>-py.png as the QApplication window icon: Dock icon on macOS, window/taskbar icon on Windows and Linux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
mcgui: New From Template (7c56a6c)
The save-file dialog made an existing template folder impossible to select (typing its name navigates into it), so users had to invent a new folder name. Now:
<name>_N) (default, first free_2,_3, …) / Replace with template / Cancel.shutil.copytree(subfolders included). The old merge path silently overwrote edited.instrfiles and failed on subfolders.mcgui: crash fixes from a monkey test (d009067)
mcrun --inforuns (GUI stays live in that loop); Run ignored when no instrument is loaded.IndexError.UnboundLocalError.GUICOLS/GUIFONTSIZEkept unless a positive integer is given.Components (e17376d)
Add missing header tags required by
ComponentParser:%Dinmisc/Cone.comp(McStas and McXtrace),%Eincontrib/SpinWave_BCO.compandunion/Union_NCrystal_material.comp. Documentation-only change, no code/physics change.mcplot / mcdisplay (a2b56fd)
mcplot_1pdf), sosavefigwrote a PNG namedmcplot_1pdf.pngand kept overwriting it.ValueError.RuntimeError.s) prints a message instead of a traceback. Root cause is upstream: pyqtgraph 0.14.0 can't parse Qt 6.11's SVG path output (reproduced with bare pyqtgraph).mcgui app icon (17a3ff4)
QApplication.setWindowIconwith the already-installed<flavour>-py.png: Dock icon on macOS, window/taskbar icon on Windows/Linux. The PNG is 115 px wide, so a larger PNG would look sharper on Retina.Testing
_2/_3, cancel, replace).No numerical behaviour changes.
🤖 Generated with Claude Code