View Issue Details

IDProjectCategoryView StatusLast Update
0001512FreeCADBugpublic2014-04-23 15:28
Reporternahshon Assigned Towmayer  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSFedora LinuxOS Version20 (x86_64)
Product Versiontrunk 
Summary0001512: After trying to set a bad value, the pad editor does not show
DescriptionIn InputField::setToLastUsedValue, if the last value from the history is not a valid quantity, an exception prevents display of the editor.

Also an error is written to the console:
Exception (Thu Apr 17 22:22:46 2014): syntax error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<type 'exceptions.Exception'>: FreeCAD exception thrown (syntax error)
Stack Trace: Traceback (most recent call last):
  File "<string>", line 1, in <module>
Steps To ReproduceCreate a simple sketch (with any closed shape, eg, a circle).
Close the sketcher
Press the "Pad" button
Type in an invalid value in the Length field and press <enter>

delete the pad, keep the sketch and select it...
(or use on a new sketch, or even close and restart FreeCAD. The problem status is persistent).
Press the "Pad" button
Result: A pad was created, but an error message is printed and the editor is not shown.
Additional Information(not tested) The same problem may also exist with other inputs that use the quantity parser.
--------------
Work-around: double click on a pad in the model tree view to edit the pad. Insert a valid value and press enter to keep it in the history.
---------------
Suggested fix - restore original text (not value) to the input field:
in src/Gui/InputField.cpp:

void InputField::setToLastUsedValue(void)
{
    std::vector<QString> hist = getHistory();
    if(hist.size()>0)
       this->setText(hist[0]);
}
TagsNo tags attached.
FreeCAD Information

Activities

There are no notes attached to this issue.

Related Changesets

FreeCAD: master a31ce8e3

2014-04-23 17:10:28

wmayer

Details Diff
+ fixes 0001512: After trying to set a bad value, the pad editor does not show Affected Issues
0001512
mod - src/Gui/InputField.cpp Diff File

Issue History

Date Modified Username Field Change
2014-04-17 21:04 nahshon New Issue
2014-04-19 09:50 wmayer Status new => confirmed
2014-04-23 15:28 wmayer Changeset attached => FreeCAD Master master a31ce8e3
2014-04-23 15:28 wmayer Assigned To => wmayer
2014-04-23 15:28 wmayer Status confirmed => closed
2014-04-23 15:28 wmayer Resolution open => fixed