Show More
@@ -100,7 +100,7 b' class CallTipWidget(QtGui.QLabel):' | |||||
100 | """ |
|
100 | """ | |
101 | painter = QtGui.QStylePainter(self) |
|
101 | painter = QtGui.QStylePainter(self) | |
102 | option = QtGui.QStyleOptionFrame() |
|
102 | option = QtGui.QStyleOptionFrame() | |
103 | option.init(self) |
|
103 | option.initFrom(self) | |
104 | painter.drawPrimitive(QtGui.QStyle.PE_PanelTipLabel, option) |
|
104 | painter.drawPrimitive(QtGui.QStyle.PE_PanelTipLabel, option) | |
105 | painter.end() |
|
105 | painter.end() | |
106 |
|
106 |
@@ -335,7 +335,7 b' class IPythonWidget(FrontendWidget):' | |||||
335 | block = self._previous_prompt_obj.block |
|
335 | block = self._previous_prompt_obj.block | |
336 |
|
336 | |||
337 | # Make sure the prompt block has not been erased. |
|
337 | # Make sure the prompt block has not been erased. | |
338 |
if block.isValid() and |
|
338 | if block.isValid() and block.text(): | |
339 |
|
339 | |||
340 | # Remove the old prompt and insert a new prompt. |
|
340 | # Remove the old prompt and insert a new prompt. | |
341 | cursor = QtGui.QTextCursor(block) |
|
341 | cursor = QtGui.QTextCursor(block) |
@@ -43,9 +43,7 b' class RichIPythonWidget(IPythonWidget):' | |||||
43 | """ |
|
43 | """ | |
44 | format = self._control.cursorForPosition(pos).charFormat() |
|
44 | format = self._control.cursorForPosition(pos).charFormat() | |
45 | name = format.stringProperty(QtGui.QTextFormat.ImageName) |
|
45 | name = format.stringProperty(QtGui.QTextFormat.ImageName) | |
46 |
if name |
|
46 | if name: | |
47 | menu = super(RichIPythonWidget, self)._context_menu_make(pos) |
|
|||
48 | else: |
|
|||
49 | menu = QtGui.QMenu() |
|
47 | menu = QtGui.QMenu() | |
50 |
|
48 | |||
51 | menu.addAction('Copy Image', lambda: self._copy_image(name)) |
|
49 | menu.addAction('Copy Image', lambda: self._copy_image(name)) | |
@@ -53,11 +51,13 b' class RichIPythonWidget(IPythonWidget):' | |||||
53 | menu.addSeparator() |
|
51 | menu.addSeparator() | |
54 |
|
52 | |||
55 | svg = format.stringProperty(self._svg_text_format_property) |
|
53 | svg = format.stringProperty(self._svg_text_format_property) | |
56 |
if |
|
54 | if svg: | |
57 | menu.addSeparator() |
|
55 | menu.addSeparator() | |
58 | menu.addAction('Copy SVG', lambda: svg_to_clipboard(svg)) |
|
56 | menu.addAction('Copy SVG', lambda: svg_to_clipboard(svg)) | |
59 | menu.addAction('Save SVG As...', |
|
57 | menu.addAction('Save SVG As...', | |
60 | lambda: save_svg(svg, self._control)) |
|
58 | lambda: save_svg(svg, self._control)) | |
|
59 | else: | |||
|
60 | menu = super(RichIPythonWidget, self)._context_menu_make(pos) | |||
61 | return menu |
|
61 | return menu | |
62 |
|
62 | |||
63 | #--------------------------------------------------------------------------- |
|
63 | #--------------------------------------------------------------------------- |
@@ -102,7 +102,7 b' class QtSubSocketChannel(SocketChannelQObject, SubSocketChannel):' | |||||
102 | pyerr_received = QtCore.Signal(object) |
|
102 | pyerr_received = QtCore.Signal(object) | |
103 |
|
103 | |||
104 | # Emitted when a message of type 'display_data' is received |
|
104 | # Emitted when a message of type 'display_data' is received | |
105 |
display_data_received = QtCore. |
|
105 | display_data_received = QtCore.Signal(object) | |
106 |
|
106 | |||
107 | # Emitted when a crash report message is received from the kernel's |
|
107 | # Emitted when a crash report message is received from the kernel's | |
108 | # last-resort sys.excepthook. |
|
108 | # last-resort sys.excepthook. |
General Comments 0
You need to be logged in to leave comments.
Login now