mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Frictions: Fix plot drawing crash.
This commit is contained in:
1 parent
b12e935a5d
commit
e400980103
3 files changed
+21
-6
No files matched your search
@@ -16,6 +16,8 @@
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
|
||||
from tools import timer, flatten
|
||||
from View.Tools.PamhyrPlot import PamhyrPlot
|
||||
|
||||
@@ -23,13 +25,20 @@ from PyQt5.QtCore import (
|
||||
QCoreApplication
|
||||
)
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
|
||||
class PlotStricklers(PamhyrPlot):
|
||||
def draw_frictions(self, frictions, color="r"):
|
||||
lst = frictions
|
||||
lst.sort(key=lambda s: s.begin_kp)
|
||||
lst = sorted(
|
||||
filter(
|
||||
lambda f: f.is_full_defined(),
|
||||
frictions
|
||||
),
|
||||
key=lambda s: s.begin_kp
|
||||
)
|
||||
|
||||
coef = flatten(
|
||||
map(
|
||||
|
||||
Reference in new issue
Block a user