Skip to content
Snippets Groups Projects

Move add_ports logic to drag_button

Merged Oscar Gustafsson requested to merge addportrefactor into master
Files
2
+ 2
2
@@ -10,6 +10,7 @@ from qtpy.QtCore import QSize, Qt, Signal
from qtpy.QtGui import QIcon
from qtpy.QtWidgets import QAction, QMenu, QPushButton
from b_asic.GUI.port_button import PortButton
from b_asic.GUI.properties_window import PropertiesWindow
from b_asic.GUI.utils import decorate_class, handle_error
from b_asic.GUI._preferences import (
@@ -249,8 +250,7 @@ class DragButton(QPushButton):
)
op = self.operation
# TODO: get height from operation
height = _get_button_height(op)
height = self.height()
_output_ports_dist = _determine_port_distance(height, op.output_count)
_input_ports_dist = _determine_port_distance(height, op.input_count)
for i, dist in enumerate(_input_ports_dist):
Loading