Skip to content
Snippets Groups Projects
Commit 1ecceeaa authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Fixed unicode titles in Dock

parent 9677b149
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@ pyqtgraph-0.9.9 [unreleased]
- Fixed ImageItem exception building histogram when image has only one value
- Fixed MeshData exception caused when vertexes have no matching faces
- Fixed GLViewWidget exception handler
- Fixed unicode support in Dock
pyqtgraph-0.9.8 2013-11-24
......
......@@ -2,6 +2,7 @@ from ..Qt import QtCore, QtGui
from .DockDrop import *
from ..widgets.VerticalLabel import VerticalLabel
from ..python2_3 import asUnicode
class Dock(QtGui.QWidget, DockDrop):
......@@ -167,7 +168,7 @@ class Dock(QtGui.QWidget, DockDrop):
self.resizeOverlay(self.size())
def name(self):
return str(self.label.text())
return asUnicode(self.label.text())
def container(self):
return self._container
......
# -*- coding: utf-8 -*-
#import sip
#sip.setapi('QString', 1)
import pyqtgraph as pg
pg.mkQApp()
import pyqtgraph.dockarea as da
def test_dock():
name = pg.asUnicode("évènts_zàhéér")
dock = da.Dock(name=name)
# make sure unicode names work correctly
assert dock.name() == name
# no surprises in return type.
assert type(dock.name()) == type(name)
"""
Helper functions which smooth out the differences between python 2 and 3.
Helper functions that smooth out the differences between python 2 and 3.
"""
import sys
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment