Closed Bug 1032482 Opened 10 years ago Closed 10 years ago

Render connections only once

Categories

(DevTools Graveyard :: Web Audio Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: jsantell, Assigned: jsantell)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached image multiconnect-wae.png
While creating a beautiful image, the web audio editor should not render connections to another audio node multiple times, even if node.connect(otherNode) is called several times.
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Attachment #8448972 - Flags: review?(vporof)
Blocks: 1022248
Comment on attachment 8448972 [details] [diff] [review]
1032482-redundant-connection-render.patch

Review of attachment 8448972 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with the comment below.

::: browser/devtools/webaudioeditor/webaudioeditor-controller.js
@@ +104,5 @@
>      AudioNodeConnections.set(this, connections);
>    }
> +
> +  // Don't duplicate add.
> +  if (!~connections.indexOf(destination)) {

Maybe using a Set for the connections would've been nicer than an array? I'd suggest doing this small refactoring if time permits.
Attachment #8448972 - Flags: review?(vporof) → review+
Now with sets
Attachment #8448972 - Attachment is obsolete: true
Attachment #8449006 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/480d3f283c9d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: