Skip to content

Commit 9cab117

Browse files
author
jantje
committed
#451 should be ok now
1 parent 98f5bdb commit 9cab117

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

it.baeyens.arduino.core/src/it/baeyens/arduino/ui/BoardSelectionPage.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ public void handleEvent(Event e) {
144144
.setItems(Programmers.fromBoards(boardFile).GetUploadProtocols());
145145
BoardSelectionPage.this.mControlUploadProtocol.setText(CurrentUploadProtocol);
146146

147+
if (BoardSelectionPage.this.mControlUploadProtocol.getText().isEmpty()) {
148+
149+
BoardSelectionPage.this.mControlUploadProtocol.setText(Const.DEFAULT);
150+
}
151+
147152
BoardSelectionPage.this.BoardModifyListener.handleEvent(null);
148153
}
149154
};
@@ -378,7 +383,7 @@ private void saveAllLastUseds() {
378383
String boardFile = this.mControlBoardsTxtFile.getText().trim();
379384
String boardName = this.mcontrolBoardName.getText().trim();
380385
String uploadPort = this.mControlUploadPort.getValue();
381-
String uploadProtocol = this.mControlUploadPort.getValue();
386+
String uploadProtocol = this.mControlUploadProtocol.getText().trim();
382387
InstancePreferences.setLastUsedBoardsFile(boardFile);
383388
InstancePreferences.setLastUsedArduinoBoard(boardName);
384389
InstancePreferences.setLastUsedUploadPort(uploadPort);
@@ -458,6 +463,9 @@ private void setValues(ICConfigurationDescription confdesc) {
458463
BoardSelectionPage.this.mControlUploadProtocol.setText(CurrentUploadProtocol);
459464
if (this.mControlUploadProtocol.getText().isEmpty()) {
460465
this.mControlUploadProtocol.setText(uploadProtocol);
466+
if (this.mControlUploadProtocol.getText().isEmpty()) {
467+
this.mControlUploadProtocol.setText(Const.DEFAULT);
468+
}
461469
}
462470

463471
this.mControlUploadPort.setValue(uploadPort);

0 commit comments

Comments
 (0)