Skip to content

Commit

Permalink
Force item repaints on mouse operations
Browse files Browse the repository at this point in the history
This fixes OSX drawing glitches in the geometry selector
  • Loading branch information
sjackso committed Jul 12, 2019
1 parent 4d53284 commit 8ffebce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/athena/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ):
Expand All @@ -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)
Expand Down

0 comments on commit 8ffebce

Please sign in to comment.