@@ -144,6 +144,11 @@ public void handleEvent(Event e) {
144
144
.setItems (Programmers .fromBoards (boardFile ).GetUploadProtocols ());
145
145
BoardSelectionPage .this .mControlUploadProtocol .setText (CurrentUploadProtocol );
146
146
147
+ if (BoardSelectionPage .this .mControlUploadProtocol .getText ().isEmpty ()) {
148
+
149
+ BoardSelectionPage .this .mControlUploadProtocol .setText (Const .DEFAULT );
150
+ }
151
+
147
152
BoardSelectionPage .this .BoardModifyListener .handleEvent (null );
148
153
}
149
154
};
@@ -378,7 +383,7 @@ private void saveAllLastUseds() {
378
383
String boardFile = this .mControlBoardsTxtFile .getText ().trim ();
379
384
String boardName = this .mcontrolBoardName .getText ().trim ();
380
385
String uploadPort = this .mControlUploadPort .getValue ();
381
- String uploadProtocol = this .mControlUploadPort . getValue ();
386
+ String uploadProtocol = this .mControlUploadProtocol . getText (). trim ();
382
387
InstancePreferences .setLastUsedBoardsFile (boardFile );
383
388
InstancePreferences .setLastUsedArduinoBoard (boardName );
384
389
InstancePreferences .setLastUsedUploadPort (uploadPort );
@@ -458,6 +463,9 @@ private void setValues(ICConfigurationDescription confdesc) {
458
463
BoardSelectionPage .this .mControlUploadProtocol .setText (CurrentUploadProtocol );
459
464
if (this .mControlUploadProtocol .getText ().isEmpty ()) {
460
465
this .mControlUploadProtocol .setText (uploadProtocol );
466
+ if (this .mControlUploadProtocol .getText ().isEmpty ()) {
467
+ this .mControlUploadProtocol .setText (Const .DEFAULT );
468
+ }
461
469
}
462
470
463
471
this .mControlUploadPort .setValue (uploadPort );
0 commit comments