Changeset e43c012 in sasview for prview/perspectives
- Timestamp:
- Oct 24, 2008 11:41:56 AM (16 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b24bf4e
- Parents:
- bbc8013
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prview/perspectives/pr/pr.py
r14d05ba re43c012 366 366 err = dataread.dy 367 367 else: 368 raise RuntimeError, "This tool can only read 1D data" 368 if isinstance(dataread, list) and len(dataread)>0: 369 x = dataread[0].x 370 y = dataread[0].y 371 err = dataread[0].dy 372 msg = "PrView only allows a single data set at a time. " 373 msg += "Only the first data set was loaded." 374 wx.PostEvent(self.parent, StatusEvent(status=msg)) 375 else: 376 raise RuntimeError, "This tool can only read 1D data" 369 377 370 378 self._current_file_data.x = x … … 613 621 err = dataread.dy 614 622 else: 615 wx.PostEvent(self.parent, StatusEvent(status="This tool can only read 1D data")) 616 return 623 if isinstance(dataread, list) and len(dataread)>0: 624 x = dataread[0].x 625 y = dataread[0].y 626 err = dataread[0].dy 627 msg = "PrView only allows a single data set at a time. " 628 msg += "Only the first data set was loaded." 629 wx.PostEvent(self.parent, StatusEvent(status=msg)) 630 else: 631 wx.PostEvent(self.parent, StatusEvent(status="This tool can only read 1D data")) 632 return 633 617 634 except: 618 635 wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value)) … … 908 925 err = self._current_file_data.err 909 926 else: 927 # Reset the status bar so that we don't get mixed up 928 # with old messages. 929 #TODO: refactor this into a proper status handling 930 wx.PostEvent(self.parent, StatusEvent(status='')) 910 931 x, y, err = self.load(path) 911 932 … … 923 944 message = "The loaded file had no error bars, statistical errors are assumed." 924 945 wx.PostEvent(self.parent, StatusEvent(status=message)) 925 else:926 wx.PostEvent(self.parent, StatusEvent(status=''))927 946 928 947 try:
Note: See TracChangeset
for help on using the changeset viewer.