Skip to content

#257 Allow to add new rows by clicking on "New" cell in the tables

Marko Vendelin requested to merge feature/257-new-interactive into main

This MR makes several changes in model/view interaction that allow to implement a simple addition of rows in the table. User is able now to click on "+ New" cell shown instead of ID for a row that is not yet added to the database. For example, add new Gel or Gel Lane or Measurement. It is consistent with the selector in the table "-> ID" and has similar interaction - just mouse left click.

For that, the following changes were done (going by main commits, from the first to the last one):

  • Check whether cell is selectable or not on cell-based approach (view asks model cell-by-cell, not row-by-row)
  • Fix a non-filed bug that prevented showing context menu ("Delete") on selectable items
  • Distinguish between explicit request to add new element (pressing by mouse a toolbar button or + New VS filling table and hoping that the last row will be added)

The last part was needed to ensure consistent addition of gels - adding "Unnamed gel" as a name to a gel without any name, as we do while pressing on toolbar button.

Please review.

Fixes: #257 (closed)

Merge request reports