Commit f8bea05
Wait for the plugin initialization (trikset#1872)
* Wait for the plugin initialization
---------
Upon initialization of the `EV3` kit plugin, a subscription to the [sensorAdded](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L128()) event in the `Box2DPhysicsEngine` is registered with a delay using [QTimerSingleShot(10)](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L112). While this does not pose an issue when utilizing `TRIK Studio`, it becomes problematic when using the `2D-model` [projectManager->open function](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/checker/twoDModelRunner/runner.cpp#L69), as the subscription is established too late. As a consequence, the sensors are not properly processed by `Box2D`.
Co-authored-by: iakov <iakov@users.noreply.github.com>1 parent 1281f48 commit f8bea05
File tree
3 files changed
+11
-2
lines changed- plugins/robots/checker/twoDModelRunner
- qrtranslations
- fr/plugins/robots
- ru/plugins/robots
3 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments