Skip to content

Commit

Permalink
Reset min/max of spin button
Browse files Browse the repository at this point in the history
  • Loading branch information
Cimbali committed Mar 23, 2017
1 parent fbf4f2c commit 2cc4f74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pympress/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def make_pwin(self):

self.show_bigbuttons = self.config.getboolean('presenter', 'show_bigbuttons')

self.spin_cur.get_adjustment().set_upper(self.doc.pages_number())
self.spin_cur.set_range(1, self.doc.pages_number())
self.hb_cur.remove(self.spin_cur)

if self.notes_mode:
Expand Down Expand Up @@ -1176,6 +1176,7 @@ def on_label_event(self, *args):
self.spin_cur.grab_focus()
self.editing_cur = True

self.spin_cur.set_range(1, self.doc.pages_number())
self.spin_cur.set_value(self.doc.current_page().number() + 1)
self.spin_cur.select_region(0, -1)

Expand Down

0 comments on commit 2cc4f74

Please sign in to comment.