Dock error / Bug?

12 views
Skip to first unread message

Lav

unread,
Feb 7, 2020, 4:15:56 AM2/7/20
to pyqtgraph
In my example attached, I noticed that if I try (consecutively twice) to drag a dock onto the bottom or top overlay of itself , it will always give me this error. (it usually takes 2 times dragging). This behavior does not happen if i drag it onto the left or right overlay.
Traceback (most recent call last):

  File "..\pyqtgraph\dockarea\Dock.py", line 247, in dropEvent
    DockDrop.dropEvent(self, *args)
  File "..\pyqtgraph\dockarea\DockDrop.py", line 78, in dropEvent
    self.area.moveDock(ev.source(), area, self)
AttributeError: 'NoneType' object has no attribute 'moveDock' 

Case2: 
I also tested the scenario in which the docks are added to the dock area with the position parameter = "bottom" => resulting into 2 widgets in a vertical column. Then if we take a widget and drag it twice on it's own overlay on the left or right we get the same error. 
For now I fixed this by adding this check in the dockarea moveDock() function:     
          
              if neighbor is not dock:
                     ( continue with the old function)

Please let me know if I am doing anything wrong. 

docks_example_rip.py
dragDocktwiceBug.png
Reply all
Reply to author
Forward
0 new messages