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
cf3e3b06
Commit
cf3e3b06
authored
6 years ago
by
Dimitar Tasev
Browse files
Options
Downloads
Patches
Plain Diff
Sort workspace now uses the algorithm, re #24547
parent
51c30963
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qt/python/mantidqt/widgets/tableworkspacedisplay/model.py
+4
-3
4 additions, 3 deletions
qt/python/mantidqt/widgets/tableworkspacedisplay/model.py
qt/python/mantidqt/widgets/tableworkspacedisplay/presenter.py
+4
-1
4 additions, 1 deletion
...ython/mantidqt/widgets/tableworkspacedisplay/presenter.py
with
8 additions
and
4 deletions
qt/python/mantidqt/widgets/tableworkspacedisplay/model.py
+
4
−
3
View file @
cf3e3b06
...
...
@@ -107,7 +107,8 @@ class TableWorkspaceDisplayModel:
def
sort
(
self
,
column_index
,
sort_ascending
):
column_name
=
self
.
ws
.
getColumnNames
()[
column_index
]
if
self
.
is_peaks_workspace
():
SortPeaksWorkspace
(
self
.
ws
,
ColumnNameToSortBy
=
column_name
,
SortAscending
=
sort_ascending
)
SortPeaksWorkspace
(
InputWorkspace
=
self
.
ws
,
OutputWorkspace
=
self
.
ws
,
ColumnNameToSortBy
=
column_name
,
SortAscending
=
sort_ascending
)
else
:
SortTableWorkspace
(
InputWorkspace
=
self
.
ws
,
OutputWorkspace
=
self
.
ws
,
Columns
=
[
column_name
]
,
Ascending
=
[
sort_ascending
]
)
SortTableWorkspace
(
InputWorkspace
=
self
.
ws
,
OutputWorkspace
=
self
.
ws
,
Columns
=
column_name
,
Ascending
=
sort_ascending
)
This diff is collapsed.
Click to expand it.
qt/python/mantidqt/widgets/tableworkspacedisplay/presenter.py
+
4
−
1
View file @
cf3e3b06
...
...
@@ -56,7 +56,7 @@ class TableWorkspaceDisplay(ObservingPresenter):
"""
self
.
model
=
model
if
model
else
TableWorkspaceDisplayModel
(
ws
)
self
.
name
=
self
.
model
.
get_
name
()
if
name
is
Non
e
el
se
name
self
.
name
=
name
if
name
els
e
s
el
f
.
model
.
get_
name
()
self
.
view
=
view
if
view
else
TableWorkspaceDisplayView
(
self
,
parent
,
self
.
name
)
self
.
parent
=
parent
self
.
plot
=
plot
...
...
@@ -83,6 +83,9 @@ class TableWorkspaceDisplay(ObservingPresenter):
def
replace_workspace
(
self
,
workspace_name
,
workspace
):
if
self
.
model
.
workspace_equals
(
workspace_name
):
self
.
model
=
TableWorkspaceDisplayModel
(
workspace
)
# block signals to prevent triggering of handleItemChanged event
# which causes an infinite recursion and a stack overflow error
self
.
view
.
blockSignals
(
True
)
self
.
load_data
(
self
.
view
)
self
.
view
.
emit_repaint
()
...
...
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