Skip to content

Commit

Permalink
re PR #619 - cleaned up schedule check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed Jun 2, 2019
1 parent 0c2e6f2 commit 752bdd5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ def __init__(self, xaml_file_name):
self._setup_printers()
self._setup_print_settings()
self.schedules_cb.ItemsSource = self._get_sheet_index_list()
if len(self.schedules_cb.ItemsSource) == 0:
self.Close()
forms.alert("No Sheet Lists (Schedules) found in current project")
script.exit()

if not self.schedules_cb.ItemsSource:
forms.alert("No Sheet Lists (Schedules) found in current project",
exitscript=True)
self.schedules_cb.SelectedIndex = 0

item_cstyle = self.sheets_lb.ItemContainerStyle
Expand Down

0 comments on commit 752bdd5

Please sign in to comment.