Fixed unicode titles in Dock
This commit is contained in:
parent
9677b1492b
commit
1ecceeaa92
@ -61,6 +61,7 @@ pyqtgraph-0.9.9 [unreleased]
|
|||||||
- Fixed ImageItem exception building histogram when image has only one value
|
- Fixed ImageItem exception building histogram when image has only one value
|
||||||
- Fixed MeshData exception caused when vertexes have no matching faces
|
- Fixed MeshData exception caused when vertexes have no matching faces
|
||||||
- Fixed GLViewWidget exception handler
|
- Fixed GLViewWidget exception handler
|
||||||
|
- Fixed unicode support in Dock
|
||||||
|
|
||||||
|
|
||||||
pyqtgraph-0.9.8 2013-11-24
|
pyqtgraph-0.9.8 2013-11-24
|
||||||
|
@ -2,6 +2,7 @@ from ..Qt import QtCore, QtGui
|
|||||||
|
|
||||||
from .DockDrop import *
|
from .DockDrop import *
|
||||||
from ..widgets.VerticalLabel import VerticalLabel
|
from ..widgets.VerticalLabel import VerticalLabel
|
||||||
|
from ..python2_3 import asUnicode
|
||||||
|
|
||||||
class Dock(QtGui.QWidget, DockDrop):
|
class Dock(QtGui.QWidget, DockDrop):
|
||||||
|
|
||||||
@ -167,7 +168,7 @@ class Dock(QtGui.QWidget, DockDrop):
|
|||||||
self.resizeOverlay(self.size())
|
self.resizeOverlay(self.size())
|
||||||
|
|
||||||
def name(self):
|
def name(self):
|
||||||
return str(self.label.text())
|
return asUnicode(self.label.text())
|
||||||
|
|
||||||
def container(self):
|
def container(self):
|
||||||
return self._container
|
return self._container
|
||||||
|
16
pyqtgraph/dockarea/tests/test_dock.py
Normal file
16
pyqtgraph/dockarea/tests/test_dock.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# -*- 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)
|
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
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
|
import sys
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user