Skip to content

Commit

Permalink
error when opening file with less entry
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Aug 29, 2024
1 parent 9f2a1c9 commit 60a83ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions viewer/feminos-viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ def load_file(self):
try:
self.event_tree = self.file["events"]
except KeyError:
self.current_entry = 0
self.update_entry(0)

messagebox.showerror(
"Error",
Expand All @@ -1963,7 +1963,7 @@ def load_file(self):
try:
self.run_tree = self.file["run"]
except KeyError:
self.current_entry = 0
self.update_entry(0)

messagebox.showerror(
"Error",
Expand All @@ -1984,7 +1984,7 @@ def load_file(self):
)

if self.current_entry >= self.event_tree.num_entries:
self.current_entry = 0
self.update_entry(0)

def open_local_file(self):
self.filepath = filedialog.askopenfilename(filetypes=[("ROOT files", "*.root")])
Expand Down

0 comments on commit 60a83ef

Please sign in to comment.