mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-29 13:30:24 +08:00
Add py3k compatibility for core widget and overlayplugin.
Dictionary keys are treated differently in py3k, causing the Canny plugin to not work on py3k.
This commit is contained in:
1 parent
4739635a1b
commit
3931f18169
2 files changed
+2
-2
No files matched your search
@@ -45,7 +45,7 @@ class OverlayPlugin(Plugin):
|
||||
self._overlay_plot = None
|
||||
self._overlay = None
|
||||
self.cmap = None
|
||||
self.color_names = self.colors.keys()
|
||||
self.color_names = [c for c in self.colors.keys()]
|
||||
|
||||
def attach(self, image_viewer):
|
||||
super(OverlayPlugin, self).attach(image_viewer)
|
||||
|
||||
@@ -232,7 +232,7 @@ class ComboBox(BaseWidget):
|
||||
self.name_label.setAlignment(QtCore.Qt.AlignLeft)
|
||||
|
||||
self._combo_box = QtGui.QComboBox()
|
||||
self._combo_box.addItems(items)
|
||||
self._combo_box.addItems([i for i in items])
|
||||
|
||||
self.layout = QtGui.QHBoxLayout(self)
|
||||
self.layout.addWidget(self.name_label)
|
||||
|
||||
Reference in new issue
Block a user