Skip to content

Commit

Permalink
Fix console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 14, 2016
1 parent d283223 commit fe31475
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/console/console.py
Expand Up @@ -407,9 +407,9 @@ def __init__(self, parent=None):
}

self.classMenu = QMenu()
for (title, icon), commands in default_command.iteritems():
for (title, icon), commands in default_command.items():
action = self.classMenu.addAction(icon, title)
action.triggered[()].connect(

This comment has been minimized.

Copy link
@slarosa

slarosa Apr 15, 2016

Member

@m-kuhn I think that the triggered signal has need of an empty tuple here [()] otherwise it passes a boolean to self.shell.commandConsole and the menu actions will not work.
Any problem to revert this line?

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Apr 15, 2016

Author Member

The console didn't open with PyQt5/Py3 with the extra brackets. I'll have a look if you tell me what I need to do to check if it works correctly.

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Apr 15, 2016

Author Member

I hope 8047a56 solves it. And it adds a test that basically just checks if the code runs error free.

This comment has been minimized.

Copy link
@slarosa

slarosa Apr 15, 2016

Member

8047a56 works fine here. thanks

action.triggered.connect(
lambda commands=commands: self.shell.commandConsole(commands))

cM = self.toolBar.widgetForAction(self.actionClass)
Expand Down

0 comments on commit fe31475

Please sign in to comment.