qtutils: simplify the BlockSignals implementation
commit87eb8c6940bce410cc39f3c2d79b56747996f4d5
authorDavid Aguilar <davvid@gmail.com>
Sun, 11 Jul 2021 18:37:36 +0000 (11 11:37 -0700)
committerDavid Aguilar <davvid@gmail.com>
Sun, 11 Jul 2021 22:25:09 +0000 (11 15:25 -0700)
tree6bac0060e454b0149c8dddee8c7911ef1a16e6da
parentb34db29178fad6344c0a1f0adb6ffb0638253f68
qtutils: simplify the BlockSignals implementation

We don't need dicts to accomplish what BlockSignals needs to do.
We only need to iterate over the widgets and values in tandem.

We have a tuple of widgets. Build a list of values during
`__enter__`. `zip()` the `widgets` tuple and `values` list in
order to apply the values during `__exit__`.

Signed-off-by: David Aguilar <davvid@gmail.com>
cola/qtutils.py