Skip to content

fix(PaintWidget): fix widget deactivation when not painting#3573

Open
Jo-Byr wants to merge 1 commit into
Kitware:masterfrom
Jo-Byr:fix-paint-widget
Open

fix(PaintWidget): fix widget deactivation when not painting#3573
Jo-Byr wants to merge 1 commit into
Kitware:masterfrom
Jo-Byr:fix-paint-widget

Conversation

@Jo-Byr

@Jo-Byr Jo-Byr commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Context

It was impossible to use paint mode in PaintWidget example.

Results

The problem is fixed.

Changes

Replaced macro.VOID return by macro.EVENT_ABORT return in handleEvent to avoid call to deactivateAllWidgets in macros invoke

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Replace macro.VOID return by macro.EVENT_ABORT return in
handleEvent to avoid call to deactivateAllWidgets in macros invoke
@Jo-Byr Jo-Byr self-assigned this Jul 24, 2026
@daker

daker commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

This was changed in #3000 maybe you need to check the usecase

);
} else {
return macro.VOID;
return macro.EVENT_ABORT;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are not "painting", what are you doing ? Why don't you want other widgets to "use" the event ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're updating the cursor circle. But return model.hasFocus ? macro.EVENT_ABORT : macro.VOID; may be more appropriate.

@Jo-Byr

Jo-Byr commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

This was changed in #3000 maybe you need to check the usecase

The problem was actually introduced in 1d56bbb.

With it, if the widget returns VOID, it's deactivated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants