bed_mesh: load default if no mesh have been loaded

even though this is not default anymore in klipper it's still the best for new users who don't use multiple profiles
This commit is contained in:
alfrix 2023-07-01 11:26:24 -03:00
parent 9da9f4d11e
commit cb1793836c

View File

@ -67,8 +67,8 @@ class BedMeshPanel(ScreenPanel):
def activate(self):
self.load_meshes()
with contextlib.suppress(KeyError):
self.activate_mesh(self._printer.get_stat("bed_mesh", "profile_name"))
if not self._printer.get_stat('bed_mesh', 'profile_name') and 'default' in self.profiles:
self.send_load_mesh(None, 'default') # this is not the default behaviour of klipper anymore
def activate_mesh(self, profile):
if self.active_mesh is not None: