Skip to content

Shouldn't AnimationTimer reset on multiple starts prevent any ticks? #297

@eugenesvk

Description

@eugenesvk

If I have a timer that's supposed to only do 1 tick and finish

nwg::AnimationTimer::builder().parent(&d.window).interval(Duration::from_millis(4000))
  .lifetime(Some(Duration::from_millis(4111))).max_tick(None).active(false)
  .build(&mut d.win_tt_timer)?;

And I bind this to, say, a OnContextMenu mouse click on a menu that only does &evt_ui.win_tt_timer.start();, I'd expect multiple consecutive clicks on this menu to reset the timer on every click so that I only get 1 tick/stop event at the end of my clicking + 4 seconds

But it seems that start doesn't reset the timer properly, I still get ticks. Though the End event seems to be correct and only happens end of clicks + 4sec

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions