diff options
Diffstat (limited to 'src/ui_widgets.py')
-rw-r--r-- | src/ui_widgets.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui_widgets.py b/src/ui_widgets.py index 48282c4..636f2ed 100644 --- a/src/ui_widgets.py +++ b/src/ui_widgets.py @@ -29,8 +29,11 @@ class EllipseWidget(QWidget): self.ellipse = None self.is_used = True + self.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding, \ + QSizePolicy.MinimumExpanding)) + def minimumSizeHint(self): - return QSize(150, 150) + return QSize(100, 100) def paintEvent(self, event): P = QPainter(self) @@ -68,6 +71,10 @@ class EllipseWidget(QWidget): if self.state is None: return + if np.isnan(self.ellipse.a) or np.isnan(self.ellipse.b) \ + or np.isnan(self.ellipse.alpha) or np.isnan(self.ellipse.theta): + return + P.resetTransform() r *= 0.88 P.translate(cx, cy) |