peng3d/gui/menus.py
def update_progressbar(self):
        """
        Updates the progressbar by re-calculating the label.
        
        It is not required to manually call this method since setting any of the
        properties of this class will automatically trigger a re-calculation.
        """
        n,nmin,nmax = self.wprogressbar.n,self.wprogressbar.nmin,self.wprogressbar.nmax
        if (nmax-nmin)==0:
            percent = 0 # prevents ZeroDivisionError
        else:
            percent = max(min((n-nmin)/(nmax-nmin),1.),0.)*100
        dat = {"value":round(n,4),"n":round(n,4),"nmin":round(nmin,4),"nmax":round(nmax,4),"percent":round(percent,4),"p":round(percent,4)}
        txt = self._label_progressbar.format(**dat)
        self.wprogresslabel.label = txt
def update_progressbar(self):
        """
        Updates the progressbar by re-calculating the label.
        
        It is not required to manually call this method since setting any of the
        properties of this class will automatically trigger a re-calculation.
        """
        n,nmin,nmax = self.wprogressbar.n,self.wprogressbar.nmin,self.wprogressbar.nmax
        if (nmax-nmin)==0:
            percent = 0 # prevents ZeroDivisionError
        else:
            percent = max(min((n-nmin)/(nmax-nmin),1.),0.)*100
        dat = {"value":round(n,4),"n":round(n,4),"nmin":round(nmin,4),"nmax":round(nmax,4),"percent":round(percent,4),"p":round(percent,4)}
        txt = self._label_progressbar.format(**dat)
        self.wprogresslabel.label = txt
Updates the progressbar by re-calculating the label.
        
        It is not required to manually call this method since setting any of the
        properties of this class will automatically trigger a re-calculation.