Changeset d6b8a1d in sasview for src/sas/qtgui/Plotting/LinearFit.py


Ignore:
Timestamp:
Nov 9, 2017 8:43:56 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
53c771e
Parents:
fbfc488
git-author:
Piotr Rozyczko <rozyczko@…> (11/07/17 08:29:59)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:56)
Message:

More Qt5 related fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/LinearFit.py

    r7969b9c rd6b8a1d  
    88from PyQt5 import QtWidgets 
    99 
    10 from sas.qtgui.Utilities.GuiUtils import formatNumber 
     10from sas.qtgui.Utilities.GuiUtils import formatNumber, DoubleValidator 
    1111 
    1212from sas.qtgui.Plotting import Fittings 
     
    4343        self.y_is_log = self.yLabel == "log10(y)" 
    4444 
    45         self.txtFitRangeMin.setValidator(QtGui.QDoubleValidator()) 
    46         self.txtFitRangeMax.setValidator(QtGui.QDoubleValidator()) 
     45        self.txtFitRangeMin.setValidator(DoubleValidator()) 
     46        self.txtFitRangeMax.setValidator(DoubleValidator()) 
    4747 
    4848        # Default values in the line edits 
     
    158158        y_model = self.model.run(xmin) 
    159159        tempx.append(xminView) 
    160         tempy.append(numpy.power(10, y_model) if self.y_is_log else y_model) 
     160        tempy.append(numpy.power(10.0, y_model) if self.y_is_log else y_model) 
    161161 
    162162        # load tempy with the maximum transformation 
    163163        y_model = self.model.run(xmax) 
    164164        tempx.append(xmaxView) 
    165         tempy.append(numpy.power(10, y_model) if self.y_is_log else y_model) 
     165        tempy.append(numpy.power(10.0, y_model) if self.y_is_log else y_model) 
    166166 
    167167        # Set the fit parameter display when  FitDialog is opened again 
     
    247247            return numpy.sqrt(numpy.sqrt(x)) 
    248248        elif self.xLabel == "log10(x)": 
    249             return numpy.power(10, x) 
     249            return numpy.power(10.0, x) 
    250250        elif self.xLabel == "ln(x)": 
    251251            return numpy.exp(x) 
    252252        elif self.xLabel == "log10(x^(4))": 
    253             return numpy.sqrt(numpy.sqrt(numpy.power(10, x))) 
     253            return numpy.sqrt(numpy.sqrt(numpy.power(10.0, x))) 
    254254        return x 
    255255 
Note: See TracChangeset for help on using the changeset viewer.