Tool Dialogs: Label at bottom doesn't update for empty lists

Issue #242 resolved
Felix Ulber created an issue

Hi, steps to reproduce:

  1. draw with any tool
  2. in the tool's dialog, select "Measurements" from "input data" area
  3. The top item of measurements is selected, and is also shown in the label at the bottom of the dialog
  4. Select any other input category which is still empty
  5. The old selection is still visible in the bottom label

I looked after how to fix it, but it was not completely simple, because the callback (slot) that sets this label is only called when item selection changes - which does not happen if a list widget is empty. I did not want to make bigger changes to the code before posting here.

Comments (6)

  1. Roman Telezhynskyi repo owner

    because the callback (slot) that sets this label is only called when item selection changes - which does not happen if a list widget is empty.

    This happens because i block signals before making changes in list.

    I did not want to make bigger changes to the code before posting here.

    I think i have found very easy solution for this issue.

  2. Felix Ulber reporter

    How do you think, what text better show if list is empty?

    If a radio button is selected that shows an empty list, I think nothing should be displayed - at least not an old string.

    This happens because i block signals before making changes in list

    No, I just meant this slot is only triggered by the signal "QListWidget::currentRowChanged", which doesnt get emmited if the list widget is empty

  3. Log in to comment