up-arrow button not disabled

Bug #1971422 reported by Lena Ernstsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TAPAAL
Fix Committed
Undecided
Kenneth Yrke Jørgensen

Bug Description

How to reproduce:
  - Add at exactly two variables to the panel
  - Select the bottom variable and remove

The up-arrow is still enabled even though there is only one variable in the panel. This is also a problem in the color type panel.

Related branches

Jiri Srba (srba)
Changed in tapaal:
milestone: none → cpn
Changed in tapaal:
assignee: nobody → Kenneth Yrke Jørgensen (yrke)
Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

Added a workaround, its not ideal, so we should revisit later on, at some point we need to refactor the variable component, its a huge mess right now.

Changed in tapaal:
status: New → In Progress
Revision history for this message
Jiri Srba (srba) wrote :

I tried to add a new color type and two variables of this new color type. Then remove the second one and I get the following:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because the return value of "javax.swing.JList.getSelectedValue()" is null
        at net.tapaal.gui.petrinet.editor.ConstantsPane.enableButtons(ConstantsPane.java:455)
        at net.tapaal.gui.petrinet.editor.ConstantsPane$VariablesListModel.removeElement(ConstantsPane.java:807)
        at net.tapaal.gui.petrinet.editor.ConstantsPane.removeVariables(ConstantsPane.java:697)
        at net.tapaal.gui.petrinet.editor.ConstantsPane.lambda$addConstantsButtons$2(ConstantsPane.java:399)

Jiri Srba (srba)
Changed in tapaal:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.