[Bugfix] Switching to/from edit mode won't close component (#3339)
[Bugfix] Switching to/from edit mode won't close component (#3339)

* Switching to/from edit mode won't close component

* Fix if no components are open

* Fix rapid edit mode toggles

This prevents multiple rapid toggles from causing errors.  It does this by disallowing the button from being clicked until the operation has completed

* Fixed multiple bad mark states

RCOS-Grading-Server/HWserver,RCOS-Grading-Server/HWserver,Submitty/Submitty,RCOS-Grading-Server/HWserver,Submitty/Submitty,RCOS-Grading-Server/HWserver,Submitty/Submitty,RCOS-Grading-Server/HWserver,Submitty/Submitty,Submitty/Submitty,Submitty/Submitty,RCOS-Grading-Server/HWserver,Submitty/Submitty,RCOS-Grading-Server/HWserver,Submitty/Submitty,RCOS-Grading-Server/HWserver,RCOS-Grading-Server/HWserver,Submitty/Submitty