Opened 6 years ago

Closed 6 years ago

#453 closed defect (fixed)

Important Grid Window functionality missing in Batch Mode

Reported by: smk78 Owned by: butler
Priority: blocker Milestone: SasView 3.1.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description (last modified by butler)

ESS Win 7 Ver 3.1.0 Build 126

Whilst noting Ticket #431, it is the case that as things stand you can no longer add the parameter uncertainties to the Grid Window, which kind of negates the usefulness of Batch Mode.

Change History (4)

comment:1 Changed 6 years ago by butler

Humm… indeed. Does not work for me either - seems that in fixing the cell editing we lost the insert column functionality. Not sure how those are connected but guess we need to figure it out.

comment:2 Changed 6 years ago by butler

  • Owner set to butler
  • Status changed from new to accepted

a quick look and what happened is that on rewriting the init for CSheet we failed to properly re-implemnt the binding to the label_right_click event. However reimplementing while seems to work for user is generating some errors so will try to track all that down before comitting fix

comment:3 Changed 6 years ago by butler

  • Description modified (diff)

Indeed ticket #424 was closed too hastily. It turns out there were several problems that still needed to be addressed.

  1. The main problem as identified in that ticket were EndEdit and PaintBackground having the wrong number of parameters. GridCellEditor was overwritten in data_processor and init and EndEdit methods were overwritten. However PaintBackground was not. While the error (too many arguments given) continued to be generated every keystroke it no longer prevented the cell from being edited. This was fixed by overriding the PaintBackground class, addding it to the new GridCellEditor class in data_processor (a bit tricker since it needed to call not the parent version but the parent's parent). No errors seem to be generated on editing any more.
  2. A few of the Grid events being used were not bound to the local methods in the process of the cleanup. In particular EVT_GRID_LABEL_RIGHT_CLICK used to bring up the context menu that allows for insertion of a column and EVT_GRID_LABEL_LEFT_CLICK that is needed to properly set the data ranges for plotting. These have been added back calling the appropriate code.
  3. In the process of removing the Edit_Menu item the on_open_menu method's section dealing with that menu item was not commented out. Thus any later menu would get the id such that when opened and that method called would execute the section written for the Edit menu and raise an exception. The removal of the menu item was done so as to be able to be able to easily add it back later if we choose to. Thus rather than commenting the section out, the self.edit = NONE was replaced wth an unused handle self.edit = wx.Menu() preventing the next menu item to get confused. This means that re-implementing the menu item should just be a question of commenting out the self.edit line and uncommenting the line beneath it which calls the add_edit_menu method. Meanwhile everything seems to now work without generating any errors without the menu being added.


Last edited 6 years ago by butler (previous) (diff)

comment:4 Changed 6 years ago by butler

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.