Skip to content

Commit

Permalink
[Import] Fixed "Invalid thread access" which occurred when new tour t…
Browse files Browse the repository at this point in the history
…ypes or tags were created when importing a tour

#938
  • Loading branch information
wolfgang-ch committed Sep 24, 2022
1 parent f668f2e commit 4f9af49
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3063,7 +3063,7 @@ public void update(final ViewerCell cell) {
final long time = isPaceAndSpeedFromRecordedTime ? tourData.getTourDeviceTime_Recorded() : tourData.getTourComputedTime_Moving();

final float pace = tourDistance == 0 ? //
0
0
: time * 1000 / tourDistance * UI.UNIT_VALUE_DISTANCE;

if (pace == 0) {
Expand Down Expand Up @@ -4499,7 +4499,8 @@ private void reimportAllImportFiles(final boolean canCancelProcess) {
canCancelProcess,
importState_Process);

importState_Process.runPostProcess();
// fix: org.eclipse.swt.SWTException: Invalid thread access
_parent.getDisplay().syncExec(() -> importState_Process.runPostProcess());
});

} catch (final Exception e) {
Expand Down

0 comments on commit 4f9af49

Please sign in to comment.