mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-20 01:30:17 +00:00
Compare commits
2 Commits
48c5682e55
...
4a09dc210a
Author | SHA1 | Date | |
---|---|---|---|
4a09dc210a | |||
cc8ab11b78 |
@ -1,3 +1,4 @@
|
|||||||
|
import logging
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
from PySide6.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
@ -6,6 +7,8 @@ from PySide6.QtWidgets import QHBoxLayout, QSizePolicy, QVBoxLayout, QWidget
|
|||||||
|
|
||||||
from ui.implements.components.ratingClassRadioButton import RatingClassRadioButton
|
from ui.implements.components.ratingClassRadioButton import RatingClassRadioButton
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class RatingClassSelector(QWidget):
|
class RatingClassSelector(QWidget):
|
||||||
valueChanged = Signal()
|
valueChanged = Signal()
|
||||||
@ -120,9 +123,10 @@ class RatingClassSelector(QWidget):
|
|||||||
|
|
||||||
if ratingClass is None or isinstance(ratingClass, bool):
|
if ratingClass is None or isinstance(ratingClass, bool):
|
||||||
button = self.sender()
|
button = self.sender()
|
||||||
elif ratingClass in range(4):
|
elif ratingClass in range(len(self.buttons)):
|
||||||
button = self.buttons[ratingClass]
|
button = self.buttons[ratingClass]
|
||||||
else:
|
else:
|
||||||
|
logger.debug(f"Cannot select {ratingClass=}, condition check failed")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not button.isEnabled():
|
if not button.isEnabled():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user