Skip to content

Commit

Permalink
Refs #19743: [ARS] Fix timer flow
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Nov 20, 2023
1 parent a292074 commit 83f858a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions qml/DomainGraphLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Item
readonly property int scrollbar_max_size_: 12
readonly property int topic_thickness_: 10
readonly property int wheel_displacement_: 30
readonly property int timer_initial_ms_interval_: 200
readonly property string topic_color_: Theme.grey
readonly property string host_color_: Theme.darkGrey
readonly property string user_color_: Theme.eProsimaLightBlue
Expand Down Expand Up @@ -1302,9 +1303,19 @@ Item

Timer {
id: safety_timer
interval: 200; running: false
onTriggered: { interval += interval; load_model() }
} function stop_timer() { safety_timer.stop() }
interval: timer_initial_ms_interval_; running: false
onTriggered: {
interval += interval
load_model()
}
}
function stop_timer() {
if (safety_timer.running)
{
safety_timer.stop()
safety_timer.interval = timer_initial_ms_interval_
}
}

// Obtain given domain id graph JSON model
function load_model()
Expand Down

0 comments on commit 83f858a

Please sign in to comment.