bitcraze / crazyflie-clients-python

Host applications and library for Crazyflie written in Python.
Other
305 stars 468 forks source link

Unify tabs and toolboxes #622

Closed krichardsson closed 2 years ago

krichardsson commented 2 years ago

This PR changes the behavior of tabs and toolboxes to make them interchangeable, that is all tabs can also be used as toolboxes. Since toolboxes can be docked to the sides of the main window, this makes it possible to see multiple tabs/toolboxes at the same time.

krichardsson commented 2 years ago

I'm not sure how to implement drag and drop from tab to toolbox, I'll skip this for now.

knmcguire commented 2 years ago

This is really nice!

I've noticed some issues with the vispy tabs which are probably just a vispy issue, but perhaps we could maybe consider leaving the loco and lighthouse toolboxes out?

WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x000001F4EDA9ABF0>
WARNING:vispy:Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x000001F4EDA9ABF0>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x000001F4EDA9ABF0>
WARNING:vispy:Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000

Also I noticed that I couldn't properly dock the tuning tab with the following issue:

WARNING: QMainWindow::addDockWidget: invalid 'area' argument
WARNING:vispy:QMainWindow::addDockWidget: invalid 'area' argument

In the beginning I was but then I broke it out of the cfclient and after that I got this error, but removing the config file resolves the beginning part at least.

Perhaps we can hope for that people won't do too many crazy stuff with the tabs to reach these?

krichardsson commented 2 years ago

Yeah, there are some "features" in QT that is out of our control. I think this PR is good enough to be merged. Even though it is not perfect, it will add value