Skip to content
Permalink
Browse files

Fix console errors

  • Loading branch information
m-kuhn committed Apr 14, 2016
1 parent d283223 commit fe314754c67ecb1f2f602b6431e92555d2dc4ef4
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/console/console.py
@@ -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)

0 comments on commit fe31475

Please sign in to comment.
You can’t perform that action at this time.