snu-quiqcl / iquip

Ion trap Quantum computing User Interface Project
GNU General Public License v3.0
7 stars 0 forks source link

Explorer: click open button without selecting any item #81

Closed kangz12345 closed 1 year ago

kangz12345 commented 1 year ago

Describe the bug

When you click the open button without selecting any item (the initial state), the program aborts. Or the reason is that the file tree is empty (when I cannot access the artiq-proxy or the file tree is actually empty), I did not check which is the reason.

Expected behavior

Open button is disabled or nothing happens even if I click the open button.

To Reproduce

Steps to reproduce the behavior:

  1. I tested this in giwon2004/63/scheduler branch.
  2. Run iquip by console command qiwis in the repository.
  3. No access to artiq-proxy server.
  4. The file tree is empty
  5. Click the open button.

Expected causes and correction methods

Check if experimentFileItem is None in openExperiment(). Or do some more signal-slot stuffs to disable the open button when no file is selected.

Screenshots

Screen Shot 2023-07-27 at 10 39 16

BECATRUE commented 1 year ago

I reproduced this situation, and I think both reasons you suggested look correct😂

kangz12345 commented 1 year ago

Thank you for the investigation! Then the first reason (not selected) is correct (because when the file tree is empty, we cannot select any item).