labscript-suite-oldfinal1 / blacs

BLACS, part of the labscript suite, provides an interface to hardware used to control a buffered experiment. It manages a queue of shots to be run as well as providing manual control over devices between shots.
Other
1 stars 1 forks source link

Tab becomes unselected when moving #17

Closed philipstarkey closed 6 years ago

philipstarkey commented 7 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


If you click a tab heading and drag it around to re-position it quickly, sometimes the window seems to change to show a different tab to the one that you're dragging, and once you let go of the header, none of the tab headings are attached to the currently visible one (i.e. it looks as though no tabs are currently selected).

no_tab_selected.PNG

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


I'm going to have a look at this now. The code for this is a complete mess because it was one of the first things I wrote while trying to learn Qt...I'll see if I can improve it.

It is worth noting that the behaviour may be different between windows and linux/OSX due to the behaviour of QDrag.exec() which blocks on windows and doesn't on linux/OSX!

philipstarkey commented 7 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


I'm still not exactly sure what conditions are required to get this to happen, but it seems to be speed related. It could be shaking fast, and moving the mouse outside of the tab area briefly, or just the fast movement. Either way, this isn't a huge priority, as it doesn't break anything, it's just a little odd. I suppose it's worth investigating if it helps to clean up the code a bit!

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


I think I've reproduced it.

Start with a tab to the right as being active (note, I think the tab bar needs to not be full, but perhaps not) Now click and drag the left most tab towards the right and keep moving your mouse until you go beyond the right most tab and the mouse shows the "drop" icon. Then when you release, no tab is highlighted!

I've also managed to hard-crash python a few times by rearranging things too fast which is more of a concern...

philipstarkey commented 7 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


I think these issues are resolved by @chrisjbillington 's new drag drop tab. Maybe have a look at that.

philipstarkey commented 6 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


Resolved by pull request #21