Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
07a139b7
Unverified
Commit
07a139b7
authored
Sep 16, 2021
by
Gigg, Martyn Anthony
Committed by
GitHub
Sep 16, 2021
Browse files
Merge pull request #32512 from mantidproject/32498_add_try_catch_to_FunctionTreeView
Add try catch to FunctionTreeView
parents
62d1c959
c1a39ad7
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/source/release/v6.2.0/muon.rst
View file @
07a139b7
...
...
@@ -32,6 +32,7 @@ Bugfixes
- In frequency domain analysis the phasetables calculated from :ref:`MuonMaxent <algm-MuonMaxent>` can be used for
:ref:`PhaseQuad <algm-PhaseQuad>` calculations on the phase tab.
- A bug has been fixed in ALC that caused mantid to crash when a user changed the PeakPicker in the PeakFitting plot.
- A bug has been fixed in ALC where setting an invalid function would cause a crash.
Muon Analysis
-------------
...
...
qt/widgets/common/src/FunctionTreeView.cpp
View file @
07a139b7
...
...
@@ -1903,22 +1903,28 @@ void FunctionTreeView::attributeChanged(QtProperty *prop) {
// Some attributes require the function to be fully reconstructed, in this
// case we'd need to emit a function replaced signal. If its not one of these
// attributes emit an attributeValueChanged signal.
if
(
std
::
find
(
REQUIRESRECONSTRUCTIONATTRIBUTES
.
begin
(),
REQUIRESRECONSTRUCTIONATTRIBUTES
.
end
(),
removePrefix
(
attributeName
))
!=
REQUIRESRECONSTRUCTIONATTRIBUTES
.
end
())
{
auto
funProp
=
m_properties
[
prop
].
parent
;
if
(
!
funProp
)
return
;
auto
fun
=
getFunction
(
funProp
,
true
);
// delete and recreate all function's properties (attributes, parameters,
// etc)
setFunction
(
funProp
,
fun
);
updateFunctionIndices
();
if
(
m_emitAttributeValueChange
)
emit
functionReplaced
(
QString
::
fromStdString
(
getFunction
()
->
asString
()));
}
else
{
if
(
m_emitAttributeValueChange
)
emit
attributePropertyChanged
(
attributeName
);
try
{
if
(
std
::
find
(
REQUIRESRECONSTRUCTIONATTRIBUTES
.
begin
(),
REQUIRESRECONSTRUCTIONATTRIBUTES
.
end
(),
removePrefix
(
attributeName
))
!=
REQUIRESRECONSTRUCTIONATTRIBUTES
.
end
())
{
auto
funProp
=
m_properties
[
prop
].
parent
;
if
(
!
funProp
)
return
;
auto
fun
=
getFunction
(
funProp
,
true
);
// delete and recreate all function's properties (attributes, parameters,
// etc)
setFunction
(
funProp
,
fun
);
updateFunctionIndices
();
if
(
m_emitAttributeValueChange
)
{
emit
functionReplaced
(
QString
::
fromStdString
(
getFunction
()
->
asString
()));
}
}
else
{
if
(
m_emitAttributeValueChange
)
{
emit
attributePropertyChanged
(
attributeName
);
}
}
}
catch
(
std
::
exception
&
expt
)
{
QMessageBox
::
critical
(
this
,
"Mantid - Error"
,
QString
::
fromStdString
(
expt
.
what
()));
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment