Page 1 of 2

[fixed] Ticket #3851 - missing material card name

Posted: Wed Feb 20, 2019 1:47 am
by uwestoehr
- open material task dialog
- select there the material card Concrete-Generic
- now use the button "use FreeCAD material editor"

result: there is no material card name and despite there the combo box at the top of the dialog has the name Concrete-generic, ist is not shown as being the active one:
FreeCAD_pmqM0Xftrg.png
FreeCAD_pmqM0Xftrg.png (31.48 KiB) Viewed 1298 times

Re: missing material card name

Posted: Wed Feb 20, 2019 1:55 am
by uwestoehr
Also after opening a custom material card, the combo box at the top of the dialog does not show the name of the now displayed card.

Re: missing material card name

Posted: Wed Feb 20, 2019 6:36 am
by bernd
see comments I added to the source code https://github.com/FreeCAD/FreeCAD/pull ... d4109e936f

Re: missing material card name

Posted: Wed Feb 20, 2019 6:49 am
by bernd
uwestoehr wrote:
Wed Feb 20, 2019 1:55 am
Also after opening a custom material card, the combo box at the top of the dialog does not show the name of the now displayed card.
this should be fixed, because if a file is opened we gone have a card name, thus we should display it. ATM the combo box is only initialized once on init of the editor https://github.com/berndhahnebach/FreeC ... tor.py#L80 this should be done after reading again. But for this the updateCards needs changes. Might be best to leave this for 0.18 ?!

Re: missing material card name

Posted: Wed Feb 20, 2019 11:29 am
by uwestoehr
bernd wrote:
Wed Feb 20, 2019 6:49 am
this should be fixed, because if a file is opened we gone have a card name, thus we should display it.
OK, this is now issue #3851.

bernd wrote:
Wed Feb 20, 2019 6:36 am
see comments I added to the source code https://github.com/FreeCAD/FreeCAD/pull ... d4109e936f
I see this different because at first I explicitly selected the card for concrete. Then I open the material editor that shows me the contents of the card of concrete.
So what is the difference to loading a card in the material editor dialog? In both cases I explicitly loaded a specific material card that is displayed in the dialog.

Re: missing material card name

Posted: Wed Feb 20, 2019 1:35 pm
by bernd
uwestoehr wrote:
Wed Feb 20, 2019 11:29 am
I see this different because at first I explicitly selected the card for concrete. Then I open the material editor that shows me the contents of the card of concrete.
So what is the difference to loading a card in the material editor dialog? In both cases I explicitly loaded a specific material card that is displayed in the dialog.
From user point you are right, but from developer point of view the material editor is called with edit from material task panel. See https://github.com/FreeCAD/FreeCAD/blob ... al.py#L249 and in https://github.com/FreeCAD/FreeCAD/blob ... or.py#L646 (link to PR because of the comments) With this method the material editor does not know the card where the material data was taken from. Thus the material editor can not display a card name. see https://github.com/FreeCAD/FreeCAD/blob ... or.py#L650

Re: missing material card name

Posted: Wed Feb 20, 2019 1:38 pm
by bernd
BTW: there is another problem in the material editor. As soon as a material property has been changed, the material card name should be empty or user defined, because the material data does not fit anymore with the material card.

Seams there is a lot air for improvements ...

Re: missing material card name

Posted: Wed Feb 20, 2019 2:15 pm
by Jee-Bee
But after creating a new material. Than adding a property because it was unknown before would be a nightmare because of loosing its relation.

Re: missing material card name

Posted: Wed Feb 20, 2019 2:16 pm
by Jee-Bee
But after creating a new material. Than adding a property because it was unknown before would be a nightmare because of loosing its relation.

Re: missing material card name

Posted: Wed Feb 20, 2019 5:04 pm
by bernd
adding a new property is different from changing a property, because it does not change the material ... mhh seams we need to realy disscuss all the possibilities and the workflows with materials ...