Skip to content

Commit

Permalink
Merge pull request #100 from Codaone/fix-worker-rename
Browse files Browse the repository at this point in the history
Fix worker rename
  • Loading branch information
mikakoi authored Apr 27, 2018
2 parents 2ba9691 + 7e700da commit 9dfe4a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion dexbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from appdirs import user_config_dir

APP_NAME = "dexbot"
VERSION = '0.1.15'
VERSION = '0.1.16'
AUTHOR = "codaone"
__version__ = VERSION

Expand Down
10 changes: 5 additions & 5 deletions dexbot/views/worker_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ def remove_widget(self):
self.view.remove_worker_widget(self.worker_name)
self.view.ui.add_worker_button.setEnabled(True)

def reload_widget(self, worker_name, new_worker_name):
""" Cancels orders of the widget's worker and then reloads the data of the widget
def reload_widget(self, worker_name):
""" Reload the data of the widget
"""
self.main_ctrl.remove_worker(worker_name)
self.worker_config = self.main_ctrl.get_worker_config(new_worker_name)
self.worker_config = self.main_ctrl.get_worker_config(worker_name)
self.setup_ui_data(self.worker_config)
self._pause_worker()

Expand All @@ -114,6 +113,7 @@ def handle_edit_worker(self):
# User clicked save
if return_value:
new_worker_name = edit_worker_dialog.worker_name
self.main_ctrl.remove_worker(self.worker_name)
self.main_ctrl.replace_worker_config(self.worker_name, new_worker_name, edit_worker_dialog.worker_data)
self.reload_widget(self.worker_name, new_worker_name)
self.reload_widget(new_worker_name)
self.worker_name = new_worker_name

0 comments on commit 9dfe4a0

Please sign in to comment.