View Issue Details

IDProjectCategoryView StatusLast Update
0002833ExpressionsBugpublic2018-09-12 15:44
Reporterpsolyca Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Fixed in Version0.18 
Summary0002833: [Spreadsheet] Keyboard events are sent to the wrong viewprovider
DescriptionWhen going to a spreadsheet by the tab, the spreadsheet is not activated and all commands are sent to the previous tab.

eivindkvedalen sum up saying keyboard events are sent to the wrong viewprovider.

Here is the forum thread :
http://forum.freecadweb.org/viewtopic.php?p=152236
Steps To ReproduceCreate a spreadsheet
Enter some text, parameters and alias - for example text (A1) : Radius, parameter (B1) : 10, alias (B1) : R
Create a body
Create an empty sketch
Go back to the spreadsheet, select a text -> you can not erase your text
Close and reopen the spreadsheet (or force recompute of spreadsheet), select your text -> you can erase your text
Draw something on your sketch - for example a circle
Go back to the spreadsheet, select a text -> you can not erase your text and sometimes the sketch is deleted
Close and reopen the spreadsheet (or force recompute of spreadsheet), select your text -> you can erase your text
Go back to your sketch, use a parameter from your spreadsheet - an expression for a radius constraint on the circle : Spreadsheet.R
Go back to the spreadsheet, select a text -> you can not erase your text and sometimes the sketch is deleted
Close and reopen the spreadsheet (or force recompute of spreadsheet), select a text not the parameter -> error message "The following, referencing objects might break. Are you sure you want to continue ? Sketch"
Tagsspreadsheet
FreeCAD Information

Activities

wmayer

2018-09-12 15:44

administrator   ~0011719

The trick is to use handle QEvent::ShortcutOverride inside SheetTableView which tells Qt not to invoke the shortcut that is assigned the "Del" key but instead let SheetTableView handle key events.

https://github.com/FreeCAD/FreeCAD/commit/ac66048b8bb740a185a65f0b5135f75b6cc09ef0

Issue History

Date Modified Username Field Change
2017-01-07 21:49 psolyca New Issue
2017-01-08 22:48 eivindkvedalen Assigned To => eivindkvedalen
2017-01-08 22:48 eivindkvedalen Status new => assigned
2017-05-01 23:24 Kunda1 Tag Attached: spreadsheet
2017-12-13 15:27 Kunda1 Project FreeCAD => Expressions
2017-12-13 15:32 Kunda1 Summary Keyboard event and Spreadsheet => [Spreadsheet] Keyboard events are sent to the wrong viewprovider
2017-12-13 15:32 Kunda1 Description Updated
2018-09-12 15:44 wmayer Assigned To eivindkvedalen => wmayer
2018-09-12 15:44 wmayer Status assigned => closed
2018-09-12 15:44 wmayer Resolution open => fixed
2018-09-12 15:44 wmayer Fixed in Version => 0.18
2018-09-12 15:44 wmayer Note Added: 0011719