Selaa lähdekoodia

Simplify _store_device_settings

Since SinkConfig is a kind of tuple now, it's immutable.  This means
everything that changes it has to create a new one, so the "clean"
configuration object doesn't need to be a whole copy of the original
one.  This commit makes it just another pointer to the same object.
Clara Hobbs 7 vuotta sitten
vanhempi
commit
0922e4b9b2
1 muutettua tiedostoa jossa 1 lisäystä ja 5 poistoa
  1. 1
    5
      pd-buddy-gtk.py

+ 1
- 5
pd-buddy-gtk.py Näytä tiedosto

@@ -269,11 +269,7 @@ class Handler:
269 269
 
270 270
     def _store_device_settings(self):
271 271
         """Store the settings that were loaded from the device"""
272
-        self.cfg_clean = pdbuddy.SinkConfig(
273
-                status=self.cfg.status,
274
-                flags=self.cfg.flags,
275
-                v=self.cfg.v,
276
-                i=self.cfg.i)
272
+        self.cfg_clean = self.cfg
277 273
 
278 274
     def _set_save_button_visibility(self):
279 275
         """Show the save button if there are new settings to save"""

Loading…
Peruuta
Tallenna