Skip to content

Commit

Permalink
Recovery of filtering, some columns reordered (#392)
Browse files Browse the repository at this point in the history
* Recovery of filtering, some columns reordered

* Allow online send from group tab
  • Loading branch information
sergeikobelev committed May 14, 2021
1 parent 72cf448 commit fbec3b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions sportorg/gui/dialogs/entry_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ def accept(self, *args, **kwargs):
proxy_model.clear_filter()
proxy_model.max_rows_count = self.max_rows_count_spin_box.value()

group_column = 4
team_column = 5
group_column = 2
team_column = 3

if GlobalAccess().get_main_window().current_tab == 1:
group_column = 2
team_column = 3
if GlobalAccess().get_main_window().current_tab == 0:
group_column = 3
team_column = 4

proxy_model.set_filter_for_column(
group_column, self.group_combo.currentText()
Expand All @@ -91,7 +91,7 @@ def accept(self, *args, **kwargs):
PersonEditDialog.GROUP_NAME = self.group_combo.currentText()
PersonEditDialog.ORGANIZATION_NAME = self.team_combo.currentText()
except Exception as e:
logging.error(str(e))
logging.exception(e)

super().accept(*args, **kwargs)

Expand Down
4 changes: 3 additions & 1 deletion sportorg/gui/menu/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ def execute(self):
items = race().persons
if self.app.current_tab == 1:
items = race().results
if self.app.current_tab == 2:
items = race().groups
if self.app.current_tab == 3:
items = race().courses
if self.app.current_tab == 4:
Expand All @@ -597,7 +599,7 @@ def execute(self):
selected_items.append(items[index])
live_client.send(selected_items)
except Exception as e:
logging.error(str(e))
logging.exception(e)


class AboutAction(Action, metaclass=ActionFactory):
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/menu/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def menu_list():
{
'title': translate('Send selected'),
'shortcut': 'Ctrl+K',
'tabs': [0, 1, 3, 4],
'tabs': [0, 1, 2, 3, 4],
'action': 'OnlineSendAction',
},
],
Expand Down

0 comments on commit fbec3b0

Please sign in to comment.