mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
The table model shares one field editor handle per column across all rows. When an edit ends, the view schedules the editor widget for deletion with deleteLater(), but the handle's QPointer stays valid until the deferred deletion runs. Clicking a cell in the same column of another row reused that doomed widget as the new cell editor, so it was destroyed right after opening and the user had to click again. Moving horizontally was unaffected since a different column uses a different editor handle. Cancel the pending deferred deletion before handing the widget out again, and guard against a null editor widget.