Skip to content

Commit

Permalink
Dropdown selects the actual selected port (#15)
Browse files Browse the repository at this point in the history
Also mentioned against issue #14.
  • Loading branch information
MurKit authored and euphy committed Apr 20, 2017
1 parent d74881f commit 936d918
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SerialPortWindow.pde
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t

ScrollableList sl = p.cp5().addScrollableList("dropdown_serialPort")
.setPosition(10, 10)
.setSize(150, 100)
.setSize(150, 150)
.setBarHeight(20)
.setItemHeight(20)
.setItemHeight(16)
.plugTo(this, "dropdown_serialPort");

sl.addItem("No serial connection", -1);
Expand Down Expand Up @@ -61,9 +61,11 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
void dropdown_serialPort(int newSerialPort)
{
println("In dropdown_serialPort, newSerialPort: " + newSerialPort);

// No serial in list is slot 0 in code because of list index
// So shift port index by one
newSerialPort -= 1;


if (newSerialPort == -2)
{
}
Expand Down

0 comments on commit 936d918

Please sign in to comment.