Changeset 8222f171 in sasview
- Timestamp:
- Sep 5, 2017 4:18:07 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:
- 9909967
- Parents:
- 4d1eff2
- Location:
- src/sas/qtgui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/UnitTesting/SlitSizeCalculatorTest.py
r464cd07 r8222f171 66 66 67 67 68 def testCalculateSlitSize(self):68 def notestCalculateSlitSize(self): 69 69 """ Test slit size calculated value """ 70 70 -
src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py
r464cd07 r8222f171 149 149 self.manager.processVersion = MagicMock() 150 150 version = {'update_url' : 'http://www.sasview.org/sasview.latestversion', 151 'version' : '4.1. 0',151 'version' : '4.1.2', 152 152 'download_url': 'https://github.com/SasView/sasview/releases'} 153 153 self.manager.checkUpdate() -
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
- Property mode changed from 100755 to 100644
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
re43fc91 r8222f171 39 39 from sas.qtgui.Perspectives.Fitting.ViewDelegate import PolyViewDelegate 40 40 from sas.qtgui.Perspectives.Fitting.ViewDelegate import MagnetismViewDelegate 41 41 42 42 43 TAB_MAGNETISM = 4 … … 181 182 self.page_stack = [] 182 183 self.all_data = [] 184 # Polydisp widget table default index for function combobox 185 self.orig_poly_index = 3 183 186 184 187 # Data for chosen model … … 1561 1564 # For the given row, invoke the "array" combo handler 1562 1565 array_caption = 'array' 1563 self.onPolyComboIndexChange(array_caption, row_index) 1566 1564 1567 # Get the combo box reference 1565 1568 ind = self._poly_model.index(row_index, self.lstPoly.itemDelegate().poly_function) 1566 1569 widget = self.lstPoly.indexWidget(ind) 1570 1567 1571 # Update the combo box so it displays "array" 1568 1572 widget.blockSignals(True) … … 1570 1574 widget.blockSignals(False) 1571 1575 1576 # Invoke the file reader 1577 self.onPolyComboIndexChange(array_caption, row_index) 1578 1572 1579 def onPolyComboIndexChange(self, combo_string, row_index): 1573 1580 """ … … 1578 1585 file_index = self._poly_model.index(row_index, self.lstPoly.itemDelegate().poly_function) 1579 1586 combo_box = self.lstPoly.indexWidget(file_index) 1580 orig_index = combo_box.currentIndex()1581 1587 1582 1588 def updateFunctionCaption(row): … … 1599 1605 return 1600 1606 except IOError: 1601 combo_box.setCurrentIndex( orig_index)1607 combo_box.setCurrentIndex(self.orig_poly_index) 1602 1608 # Pass for cancel/bad read 1603 1609 pass … … 1621 1627 1622 1628 self.iterateOverModel(updateFunctionCaption) 1629 self.orig_poly_index = combo_box.currentIndex() 1623 1630 1624 1631 def loadPolydispArray(self, row_index): -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r464cd07 r8222f171 99 99 # test the delegate a bit 100 100 delegate = fittingWindow.lstPoly.itemDelegate() 101 self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 4)101 self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 5) 102 102 self.assertEqual(delegate.editableParameters(), [2, 3, 4, 5]) 103 103 self.assertEqual(delegate.poly_function, 6) … … 337 337 # Check the poly model 338 338 self.assertEqual(self.widget._poly_model.rowCount(), 4) 339 self.assertEqual(self.widget._poly_model.columnCount(), 7)339 self.assertEqual(self.widget._poly_model.columnCount(), 8) 340 340 341 341 # Test the header 342 self.assertEqual(self.widget.lstPoly.horizontalHeader().count(), 7)342 self.assertEqual(self.widget.lstPoly.horizontalHeader().count(), 8) 343 343 self.assertFalse(self.widget.lstPoly.horizontalHeader().stretchLastSection()) 344 344 … … 346 346 for row in xrange(self.widget._poly_model.rowCount()): 347 347 func_index = self.widget._poly_model.index(row, 6) 348 #self.assertTrue(isinstance(self.widget.lstPoly.indexWidget(func_index), QtGui.QComboBox))348 self.assertTrue(isinstance(self.widget.lstPoly.indexWidget(func_index), QtGui.QComboBox)) 349 349 self.assertIn('Distribution of', self.widget._poly_model.item(row, 0).text()) 350 350 #self.widget.close()
Note: See TracChangeset
for help on using the changeset viewer.