Skip to content
Snippets Groups Projects
Commit 8390520f authored by Dimitar Tasev's avatar Dimitar Tasev
Browse files

Address comments from review, re #24475

Remove whitespace in multiple files.
Make ObserverView and ObserverPresenter inherit object
Add superclass call in instrument view presenter
Remove unnecessary overload in table worspace python export
parent 86190011
No related branches found
No related tags found
No related merge requests found
......@@ -472,9 +472,9 @@ PyObject *cell(ITableWorkspace &self, const object &value, int row_or_col) {
* @param row_or_col An integer giving the row if value is a string or the
* column if value is an index
*/
void setCellImpl(ITableWorkspace &self, const object &col_or_row,
const int row_or_col, const object &value,
const bool &notify_replace) {
void setCell(ITableWorkspace &self, const object &col_or_row,
const int row_or_col, const object &value,
const bool &notify_replace) {
Mantid::API::Column_sptr column;
int row(-1);
getCellLoc(self, col_or_row, row_or_col, column, row);
......@@ -484,17 +484,6 @@ void setCellImpl(ITableWorkspace &self, const object &col_or_row,
self.modified();
}
}
void setCell(ITableWorkspace &self, const object &col_or_row,
const int row_or_col, const object &value) {
setCellImpl(self, col_or_row, row_or_col, value, true);
}
void setCellNoNotify(ITableWorkspace &self, const object &col_or_row,
const int row_or_col, const object &value,
const object &notify_replace) {
bool notify = extract<bool>(notify_replace)();
setCellImpl(self, col_or_row, row_or_col, value, notify);
}
} // namespace
/**
......@@ -687,14 +676,7 @@ void export_ITableWorkspace() {
.def("setCell", &setCell,
(arg("self"), arg("row_or_column"), arg("column_or_row"),
arg("value")),
"Sets the value of a given cell. If the row_or_column argument is a "
"number then it is interpreted as a row otherwise it "
"is interpreted as a column name.")
.def("setCell", &setCellNoNotify,
(arg("self"), arg("row_or_column"), arg("column_or_row"),
arg("value"), arg("notify_replace")),
arg("value"), arg("notify_replace") = true),
"Sets the value of a given cell. If the row_or_column argument is a "
"number then it is interpreted as a row otherwise it "
"is interpreted as a column name. If notify replace is false, then "
......
......@@ -9,7 +9,7 @@
from __future__ import (absolute_import, division, print_function)
class ObservingPresenter:
class ObservingPresenter(object):
"""
This class provides some common functions for classes that need to be observable.
It is not a GUI class, and if used, should be inherited by the presenter.
......
......@@ -9,7 +9,7 @@
from __future__ import (absolute_import, division, print_function)
class ObservingView:
class ObservingView(object):
"""
This class provides some common functions needed across views observing the ADS.
It runs the close_signal so that the view is closed from the GUI thread,
......@@ -30,15 +30,6 @@ class ObservingView:
TITLE_STRING = "{} - Mantid"
def __init__(self, _):
"""
This __init__ is added to conform with the Qt super-class constructor, and is
called when the super(..., self).__init__ is executed in the view inheriting this.
It is not strictly required, but it prevents an inspection warning in PyCharm.
"""
pass
def emit_close(self):
"""
Emits a close signal to the main GUI thread that triggers the built-in close method.
......
......@@ -5,8 +5,6 @@
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
from __future__ import (absolute_import, division, print_function)
import unittest
......
......@@ -5,8 +5,6 @@
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
from __future__ import (absolute_import, division, print_function)
from mock import Mock
......
......@@ -5,7 +5,6 @@
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
from __future__ import (absolute_import, division, print_function)
from mock import Mock
......
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright &copy; 2019 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
from __future__ import (absolute_import, division, print_function)
from mock import Mock
from mantidqt.widgets.common.observing_presenter import ObservingPresenter
......
......@@ -5,8 +5,6 @@
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
from __future__ import (absolute_import, division, print_function)
from mock import Mock
......
......@@ -27,6 +27,7 @@ class InstrumentViewPresenter(ObservingPresenter):
view = None
def __init__(self, ws, parent=None, ads_observer=None):
super(InstrumentViewPresenter, self).__init__()
self.ws_name = ws.name()
self.view = InstrumentView(self, self.ws_name, parent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment