mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
geometry: Fix move profile up/down.
This commit is contained in:
1 parent
59c4463bf7
commit
bef640168e
4 files changed
+63
-60
No files matched your search
@@ -111,6 +111,19 @@ class Reach:
|
||||
self._profiles.pop(index)
|
||||
self._update_profile_numbers()
|
||||
|
||||
def move_up_profile(self, index: int):
|
||||
if index < len(self.profiles):
|
||||
next = index - 1
|
||||
|
||||
p = self._profiles
|
||||
p[index], p[next] = p[next], p[index]
|
||||
|
||||
def move_down_profile(self, index: int):
|
||||
if index >= 0:
|
||||
prev = index + 1
|
||||
|
||||
p = self._profiles
|
||||
p[index], p[prev] = p[prev], p[index]
|
||||
|
||||
def get_x(self):
|
||||
return [profile.x() for profile in self.profiles]
|
||||
|
||||
Reference in new issue
Block a user