Skip to content

Commit

Permalink
canvas/canvasmain: Fix 'Examples' action handling in the welcome dialog
Browse files Browse the repository at this point in the history
Accept and close the welcome dialog on successful load.
  • Loading branch information
ales-erjavec committed Nov 16, 2017
1 parent 64f585f commit a92bfd6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Orange/canvas/application/canvasmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ def open_recent():
if self.recent_scheme() == QDialog.Accepted:
dialog.accept()

def tutorial():
def open_examples():
if self.tutorial_scheme() == QDialog.Accepted:
dialog.accept()

Expand Down Expand Up @@ -1437,6 +1437,13 @@ def tutorial():
icon=canvas_icons("Recent.svg")
)

examples_action = \
QAction(self.examples_action.text(), dialog,
icon=self.examples_action.icon(),
toolTip=self.examples_action.toolTip(),
whatsThis=self.examples_action.whatsThis(),
triggered=open_examples,
)
tutorials_action = \
QAction(self.tr("Tutorials"), self,
objectName="tutorials-action",
Expand All @@ -1445,7 +1452,7 @@ def tutorial():
icon=canvas_icons("YouTube.svg")
)

bottom_row = [tutorials_action, self.examples_action,
bottom_row = [tutorials_action, examples_action,
self.get_started_action]

self.new_action.triggered.connect(dialog.accept)
Expand Down

0 comments on commit a92bfd6

Please sign in to comment.