|
|
|
@ -146,6 +146,18 @@ class ControlButtonWgt(QtGui.QWidget):
|
|
|
|
|
if hasattr (self, 'button_widget'):
|
|
|
|
|
end_layout.addWidget(self.prev_button)
|
|
|
|
|
# self.grid.addWidget(self.prev_button, x, y)
|
|
|
|
|
else:
|
|
|
|
|
self.prev_button = QtGui.QPushButton(self)
|
|
|
|
|
self.prev_button.setText(_('Cancel'))
|
|
|
|
|
|
|
|
|
|
self.prev_button.clicked.connect(self.button_disabled)
|
|
|
|
|
self.prev_button.clicked.connect(self.clear_method_cache)
|
|
|
|
|
|
|
|
|
|
self.prev_button.setMinimumWidth(62)
|
|
|
|
|
self.prev_button.setFixedHeight(32)
|
|
|
|
|
if hasattr (self, 'button_widget'):
|
|
|
|
|
end_layout.addWidget(self.prev_button)
|
|
|
|
|
|
|
|
|
|
if main_frame.view.groups.GroupField[-1].last and not \
|
|
|
|
|
main_frame.isBrief(self.ClientObj.param_objects\
|
|
|
|
|
[main_frame.method_name]['step']+1) or brief:
|
|
|
|
@ -251,6 +263,26 @@ class ControlButtonWgt(QtGui.QWidget):
|
|
|
|
|
self.hide()
|
|
|
|
|
self._parent.back()
|
|
|
|
|
|
|
|
|
|
def clear_method_cache(self):
|
|
|
|
|
self.button_disabled()
|
|
|
|
|
sid = int(self.ClientObj.sid)
|
|
|
|
|
|
|
|
|
|
if hasattr (self._parent.MainFrameWgt, 'method_name'):
|
|
|
|
|
method = self._parent.MainFrameWgt.method_name
|
|
|
|
|
try:
|
|
|
|
|
res = self.ClientObj.client.service.clear_method_cache \
|
|
|
|
|
(sid, method)
|
|
|
|
|
except Exception as e:
|
|
|
|
|
_print (e)
|
|
|
|
|
from calculate.consolegui.application.ConnectionTabs \
|
|
|
|
|
import SelectedMethodWgt
|
|
|
|
|
if type(self.window()) == SelectedMethodWgt:
|
|
|
|
|
self.window().close()
|
|
|
|
|
else:
|
|
|
|
|
self.del_button()
|
|
|
|
|
self.hide()
|
|
|
|
|
self._parent.back()
|
|
|
|
|
|
|
|
|
|
def button_disabled(self):
|
|
|
|
|
if hasattr(self, 'next_button'):
|
|
|
|
|
self.next_button.setDisabled(True)
|
|
|
|
|