Changeset 7fb471d in sasview for src/sas/qtgui/Calculators/GenericScatteringCalculator.py
- Timestamp:
- Nov 9, 2017 8:41:56 AM (7 years ago)
- 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:
- 4992ff2
- Parents:
- cee5c78
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/27/17 08:49:35)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/GenericScatteringCalculator.py
- Property mode changed from 100755 to 100644
rb3e8629 r7fb471d 235 235 """Check range of text edits for QMax and Number of Qbins """ 236 236 text_edit = self.sender() 237 text_edit.setStyleSheet( 238 QtCore.QString.fromUtf8('background-color: rgb(255, 255, 255);')) 237 text_edit.setStyleSheet('background-color: rgb(255, 255, 255);') 239 238 if text_edit.text(): 240 239 value = float(str(text_edit.text())) 241 240 if text_edit == self.txtQxMax: 242 241 if value <= 0 or value > 1000: 243 text_edit.setStyleSheet(QtCore.QString.fromUtf8( 244 'background-color: rgb(255, 182, 193);')) 242 text_edit.setStyleSheet('background-color: rgb(255, 182, 193);') 245 243 else: 246 text_edit.setStyleSheet(QtCore.QString.fromUtf8( 247 'background-color: rgb(255, 255, 255);')) 244 text_edit.setStyleSheet('background-color: rgb(255, 255, 255);') 248 245 elif text_edit == self.txtNoQBins: 249 246 if value < 2 or value > 1000: 250 self.txtNoQBins.setStyleSheet(QtCore.QString.fromUtf8( 251 'background-color: rgb(255, 182, 193);')) 247 self.txtNoQBins.setStyleSheet('background-color: rgb(255, 182, 193);') 252 248 else: 253 self.txtNoQBins.setStyleSheet(QtCore.QString.fromUtf8( 254 'background-color: rgb(255, 255, 255);')) 249 self.txtNoQBins.setStyleSheet('background-color: rgb(255, 255, 255);') 255 250 256 251 def update_gui(self): … … 555 550 # Add deferred callback for call return 556 551 d.addCallback(self.plot_1_2d) 552 d.addErrback(self.calculateFailed) 557 553 except: 558 554 log_msg = "{}. stop".format(sys.exc_info()[1]) … … 564 560 Copied from previous version 565 561 """ 562 pass 563 564 def calculateFailed(self, reason): 565 """ 566 """ 567 print("Calculate Failed with:\n", reason) 566 568 pass 567 569
Note: See TracChangeset
for help on using the changeset viewer.