View Issue Details

IDProjectCategoryView StatusLast Update
0000195FreeCADBugpublic2010-11-09 16:06
Reporteryorik Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0000195: Drag&dropping a file in freecad with no document open calls the wrong method
DescriptionFollowing discussion in another bug report ( http://sourceforge.net/tracker/?func=detail&atid=455298&aid=3095897&group_id=49159 ), I found this bug:

If you drag & drop a file that is handled by a script (for example a dxf file) in freecad, if no document is open, the "insert" method of the script is called, instead of the "open" method, resulting in an error (the "insert" method doesn't create a new document). If no document is open, the "open" method should be called instead.
Steps To Reproduce- open freecad
- if a default empty document was created, close it (if no default empty document was created, the bug happens too).
- drag & drop a dxf file in freecad (for ex. the file attached in the above linked bug report)
- the "insert" method is called, resulting in this error: Exception (Sat Nov 6 14:43:49 2010): Unknown document 'Unnamed'
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2010-11-09 15:55

administrator   ~0000407

> the "insert" method doesn't create a new document
Yes, this was the old behaviour but I changed it some time ago that the insert() method creates a document with the given name if it doesn't exist. The reason for the change was that other file types such as .py open a text editor but do not need a 3d view. So, opening a 3d view if there is none _before_ loading a .py file would be a bit annoying.

wmayer

2010-11-09 16:06

administrator   ~0000408

In rev. 3708 I have adjusted the insert() method of the import scripts to handle the new behaviour.

Issue History

Date Modified Username Field Change
2010-11-06 15:47 yorik New Issue
2010-11-09 15:55 wmayer Note Added: 0000407
2010-11-09 16:06 wmayer Note Added: 0000408
2010-11-09 16:06 wmayer Assigned To => wmayer
2010-11-09 16:06 wmayer Status new => closed
2010-11-09 16:06 wmayer Resolution open => fixed