(self, mode)
Set the selection mode.
Set the selection mode.
Set the selection mode .
def setSelectionMode(self, mode):
        """
        Set the selection mode.
        """
        assert mode in [DendrogramWidget.NoSelection,
                        DendrogramWidget.SingleSelection,
                        DendrogramWidget.ExtendedSelection]

        if self.__selectionMode != mode:
            self.__selectionMode = mode
            if self.__selectionMode == DendrogramWidget.NoSelection and \
                    self._selection:
                self.setSelectedClusters([])
            elif self.__selectionMode == DendrogramWidget.SingleSelection and \
                    len(self._selection) > 1:
                self.setSelectedClusters([self.selected_nodes()[-1]])
def setSelectionMode ( self , mode ) : assert mode in [ DendrogramWidget . NoSelection , DendrogramWidget . SingleSelection , DendrogramWidget . ExtendedSelection ] if self . __selectionMode != mode : self . __selectionMode = mode if self . __selectionMode == DendrogramWidget . NoSelection and self . _selection : self . setSelectedClusters ( [ ] ) elif self . __selectionMode == DendrogramWidget . SingleSelection and len ( self . _selection ) > 1 : self . setSelectedClusters ( [ self . selected_nodes ( ) [ - 1 ] ] )