From 8ffebcea585f4a606906d7bc2853d3d798b3d93a Mon Sep 17 00:00:00 2001 From: Steve Jackson Date: Fri, 12 Jul 2019 16:31:07 -0700 Subject: [PATCH] Force item repaints on mouse operations This fixes OSX drawing glitches in the geometry selector --- src/athena/mainwindow.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/athena/mainwindow.py b/src/athena/mainwindow.py index 1a33338..f7b0f4b 100644 --- a/src/athena/mainwindow.py +++ b/src/athena/mainwindow.py @@ -70,6 +70,7 @@ def _addFile( self, heading, name, filepath ): item = QTreeWidgetItem( heading ) item.setText( 0, name ) item.setData( 0, Qt.UserRole, filepath.resolve() ) + item.setFlags( Qt.ItemIsSelectable | Qt.ItemIsEnabled ) return item def add2DExampleFile( self, filepath ): @@ -90,6 +91,10 @@ def handleSelect( self, current_item, previous_item ): if data is not None: self.newFileSelected.emit( data ) + def mousePressEvent( self, event ): + super().mousePressEvent(event) + self.repaint() + class ColorButton(QPushButton): def __init__( self, *args, **kw ): super().__init__(*args, **kw)