Selaa lähdekoodia

Fix for unsupported float for setValue

```
% labelme examples/instance_segmentation/data_annotated
This JSON file (examples/instance_segmentation/data_annotated/2011_000003.json) may be incompatible with current labelme. version in file: 4.0.0, current version: 5.0.3
Traceback (most recent call last):
  File "/Users/wkentaro/Documents/labelme/labelme/app.py", line 1377, in scrollRequest
    self.setScroll(orientation, value)
  File "/Users/wkentaro/Documents/labelme/labelme/app.py", line 1380, in setScroll
    self.scrollBars[orientation].setValue(value)
TypeError: setValue(self, int): argument 1 has unexpected type 'float'
[1]    19915 abort      labelme examples/instance_segmentation/data_annotated
```
Kentaro Wada 2 vuotta sitten
vanhempi
commit
770f55f2d1
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      labelme/app.py

+ 1 - 1
labelme/app.py

@@ -1377,7 +1377,7 @@ class MainWindow(QtWidgets.QMainWindow):
         self.setScroll(orientation, value)
 
     def setScroll(self, orientation, value):
-        self.scrollBars[orientation].setValue(value)
+        self.scrollBars[orientation].setValue(int(value))
         self.scroll_values[orientation][self.filename] = value
 
     def setZoom(self, value):