예제 #1
0
    def __transferSelectionFromContext(self):

        selection = ContextAlgo.getSelectedPaths(self.getContext())
        with Gaffer.BlockedConnection(self.__selectionChangedConnection):
            self.__pathListing.setSelection(selection,
                                            scrollToFirst=True,
                                            expandNonLeaf=False)
예제 #2
0
	def __transferSelectionFromContext( self ) :

		selection = ContextAlgo.getSelectedPaths( self.getContext() ).paths()
		with Gaffer.BlockedConnection( self.__selectionChangedConnection ) :
			## \todo Qt is dog slow with large non-contiguous selections,
			# so we're only mirroring single selections currently. Rewrite
			# PathListingWidget so it manages selection itself using a PathMatcher
			# and we can refer to the same data structure everywhere, and reenable
			# mirroring of multi-selection.
			if len( selection ) == 1 :
				p = self.__pathListing.getPath()
				selection = [ p.copy().setFromString( s ) for s in selection ]
				self.__pathListing.setSelectedPaths( selection, scrollToFirst=True, expandNonLeaf=False )
			else :
				self.__pathListing.setSelectedPaths( [] )
예제 #3
0
    def __transferSelectionFromContext(self):

        selection = ContextAlgo.getSelectedPaths(self.getContext()).paths()
        with Gaffer.BlockedConnection(self.__selectionChangedConnection):
            ## \todo Qt is dog slow with large non-contiguous selections,
            # so we're only mirroring single selections currently. Rewrite
            # PathListingWidget so it manages selection itself using a PathMatcher
            # and we can refer to the same data structure everywhere, and reenable
            # mirroring of multi-selection.
            if len(selection) == 1:
                p = self.__pathListing.getPath()
                selection = [p.copy().setFromString(s) for s in selection]
                self.__pathListing.setSelectedPaths(selection,
                                                    scrollToFirst=True,
                                                    expandNonLeaf=False)
            else:
                self.__pathListing.setSelectedPaths([])
예제 #4
0
	def __transferSelectionFromContext( self ) :

		selection = ContextAlgo.getSelectedPaths( self.getContext() )
		with Gaffer.BlockedConnection( self.__selectionChangedConnection ) :
			self.__pathListing.setSelection( selection, scrollToFirst=True, expandNonLeaf=False )