Commit 6948d30b authored by Pete Peterson's avatar Pete Peterson
Browse files

Merge pull request #15741 from mantidproject/15682_fix_mantidplot_script_cmd_arg

Fix MantidPlot -x option 
parents 1079aeee 1b965110
......@@ -765,14 +765,21 @@ bool ScriptingWindow::shouldEnableAbort() const {
}
/**
* Opens a script providing a copy is not already open
* @param newTabName The name of the newTab to open
* Opens a script providing a copy is not already open. On exit the
* active tab will be the one containing the given script.
* @param filename The name of the newTab to open
*/
void ScriptingWindow::openUnique(const QString &newTabName) {
void ScriptingWindow::openUnique(QString filename) {
auto openFiles = m_manager->fileNamesToQStringList();
auto position = openFiles.contains(newTabName);
if (!position) {
m_manager->newTab(openFiles.size(), newTabName);
// The list of open files contains absolute paths so make sure we have one
// here
filename = QFileInfo(filename).absFilePath();
auto position = openFiles.indexOf(filename);
if (position < 0) {
m_manager->newTab(openFiles.size(), filename);
} else {
// make it the current tab
m_manager->setCurrentIndex(position);
}
}
......
......@@ -56,7 +56,7 @@ public:
/// Set whether to accept/reject close events
void acceptCloseEvent(const bool value);
/// Opens a script providing a copy is not already open
void openUnique(const QString &);
void openUnique(QString filename);
signals:
/// Show the scripting language dialog
......
......@@ -97,6 +97,9 @@ Algorithm Toolbox
Scripting Window
################
- If `MantidPlot` was launched with the `-x` option but the script was already opened by the recent files list then
the wrong script would be executed. This bug has been fixed. `#15682 <https://github.com/mantidproject/mantid/issue/15682>`_
Documentation
#############
......@@ -112,7 +115,7 @@ Bugs Resolved
- VSI: Fix Mantid crash when pressing :ref:`Scale <algm-Scale>` or Cut when "builtin" node
is selected in Pipeline Browser
- VSI: The TECHNIQUE-DEPENDENT initial view now checks for Spectroscopy before Neutron Diffraction.
- VSI: The TECHNIQUE-DEPENDENT initial view now checks for Spectroscopy before Neutron Diffraction.
SliceViewer Improvements
------------------------
......@@ -130,12 +133,12 @@ VSI Improvements
- The representation of points in the splatter plot was changed from opaque cubes to translucent spheres.
.. figure:: ../../images/VSIPointGaussianRepresentation.png
:align: center
:align: center
- The sphere and ellipse wireframes have been simplified so that it is easier to see the enclosed points.
- The sphere and ellipse wireframes have been simplified so that it is easier to see the enclosed points.
.. figure:: ../../images/VSIEllipses.png
:align: center
:align: center
- Removed the error-prone right-click option to view peaks workspaces in the VSI. One should load a MDWorkspace,
then drag the corresponding peaks workspace into the VSI window.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment