Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
2586cc53
Commit
2586cc53
authored
9 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Check to see if the file still exists in the previous location
Refs #13292
parent
fab72341
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/MantidPlot/src/ScriptingWindow.cpp
+16
-10
16 additions, 10 deletions
Code/Mantid/MantidPlot/src/ScriptingWindow.cpp
with
16 additions
and
10 deletions
Code/Mantid/MantidPlot/src/ScriptingWindow.cpp
+
16
−
10
View file @
2586cc53
...
...
@@ -321,8 +321,8 @@ void ScriptingWindow::setMenuStates(int ntabs) {
void
ScriptingWindow
::
setEditActionsDisabled
(
bool
off
)
{
auto
actions
=
m_editMenu
->
actions
();
foreach
(
QAction
*
action
,
actions
)
{
if
(
strcmp
(
"Find"
,
action
->
name
())
!=
0
)
{
action
->
setDisabled
(
off
);
if
(
strcmp
(
"Find"
,
action
->
name
())
!=
0
)
{
action
->
setDisabled
(
off
);
}
}
}
...
...
@@ -345,7 +345,8 @@ void ScriptingWindow::setExecutionActionsDisabled(bool off) {
* @param off :: If the true the items are disabled else they are enabled
*/
void
ScriptingWindow
::
setAbortActionsDisabled
(
bool
off
)
{
if
(
!
shouldEnableAbort
())
off
=
true
;
if
(
!
shouldEnableAbort
())
off
=
true
;
m_abortCurrent
->
setDisabled
(
off
);
}
...
...
@@ -378,9 +379,7 @@ void ScriptingWindow::executeSelection() {
/**
* Ask the manager to abort the script execution for the current script.
*/
void
ScriptingWindow
::
abortCurrent
()
{
m_manager
->
abortCurrentScript
();
}
void
ScriptingWindow
::
abortCurrent
()
{
m_manager
->
abortCurrentScript
();
}
/**
*/
...
...
@@ -763,11 +762,19 @@ bool ScriptingWindow::shouldEnableAbort() const {
*/
void
ScriptingWindow
::
openPreviousTabs
(
const
QStringList
&
tabsToOpen
)
{
const
int
totalFiles
=
tabsToOpen
.
size
();
if
(
totalFiles
==
0
)
{
QStringList
validFiles
=
QStringList
();
for
(
int
i
=
0
;
i
<
totalFiles
;
i
++
)
{
if
(
FILE
*
file
=
fopen
(
tabsToOpen
[
i
].
toStdString
().
c_str
(),
"r"
))
{
fclose
(
file
);
validFiles
.
append
(
tabsToOpen
[
i
]);
}
}
const
int
validTotal
=
validFiles
.
size
();
if
(
validTotal
==
0
)
{
m_manager
->
newTab
();
}
else
{
for
(
int
i
=
0
;
i
<
totalFiles
;
i
++
)
{
m_manager
->
newTab
(
i
,
tabsToOpen
[
i
]);
for
(
int
i
=
0
;
i
<
validTotal
;
i
++
)
{
m_manager
->
newTab
(
i
,
validFiles
[
i
]);
}
}
}
...
...
@@ -782,7 +789,6 @@ Script::ExecutionMode ScriptingWindow::getExecutionMode() const {
return
Script
::
Serialised
;
}
QStringList
ScriptingWindow
::
extractPyFiles
(
const
QList
<
QUrl
>
&
urlList
)
const
{
QStringList
filenames
;
for
(
int
i
=
0
;
i
<
urlList
.
size
();
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment