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)