Commit 6b3cfbc6 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Fixed parametertree selection bug

parent 2095a4c8
from pyqtgraph.Qt import QtCore, QtGui from pyqtgraph.Qt import QtCore, QtGui
from pyqtgraph.widgets.TreeWidget import TreeWidget from pyqtgraph.widgets.TreeWidget import TreeWidget
import os, weakref, re import os, weakref, re
from .ParameterItem import ParameterItem
#import functions as fn #import functions as fn
...@@ -103,7 +104,7 @@ class ParameterTree(TreeWidget): ...@@ -103,7 +104,7 @@ class ParameterTree(TreeWidget):
sel = self.selectedItems() sel = self.selectedItems()
if len(sel) != 1: if len(sel) != 1:
sel = None sel = None
if self.lastSel is not None: if self.lastSel is not None and isinstance(self.lastSel, ParameterItem):
self.lastSel.selected(False) self.lastSel.selected(False)
if sel is None: if sel is None:
self.lastSel = None self.lastSel = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment