Skip to content

Commit

Permalink
OSX QGraphicsEffect glitch disable test
Browse files Browse the repository at this point in the history
  • Loading branch information
MaurizioB committed May 9, 2017
1 parent de33ea0 commit 8ffe8fb
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions bigglesworth/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,7 @@ def __init__(self, main):
self.save = False
self._edited = False

self.shown = False
self.create_layout()
self.setSoundDump()

Expand Down Expand Up @@ -2389,7 +2390,7 @@ def create_layout(self):
filter_matrix_labels = 'Mod Matrix Editor', 'Filters'

if sys.platform == 'darwin':
filter_matrix_tuple = filter_widget, matrix_widget
self.filter_matrix_widgets = filter_matrix_tuple = filter_widget, matrix_widget
matrix_widget.hide()
def filter_matrix_set():
id = filter_matrix_cycle.next()
Expand Down Expand Up @@ -2465,7 +2466,7 @@ def filter_matrix_set():
# arp_widget.setLayout(self.create_arp_editor())

if sys.platform == 'darwin':
adv_arp_tuple = adv_widget, arp_widget
self.adv_arp_widgets = adv_arp_tuple = adv_widget, arp_widget
arp_widget.hide()
def adv_arp_set():
id = adv_arp_cycle.next()
Expand Down Expand Up @@ -2525,6 +2526,23 @@ def adv_arp_set():
self.editing_mask.setReference(self.display.prog_name)
self.editing_mask.raise_()

def showEvent(self, event):
if sys.platform != 'darwin': return
if not self.shown:
self.shown = True
widgets_lists = self.filter_matrix_widgets, self.adv_arp_widgets
for w_list in widgets_lists:
width = height = 0
for widget in w_list:
if widget.isVisible():
shown = widget
widget.show()
width = max(width, widget.width())
height = max(height, widget.height())
for widget in w_list:
widget.setVisible(True if widget == shown else False)
widget.setFixedSize(width, height)

def __getattr__(self, attr):
try:
return self.object_dict[attr].value
Expand Down

0 comments on commit 8ffe8fb

Please sign in to comment.