Bug #1765

GUI: ExportToPython generates unsorted material labels.

Added by pospelov 9 months ago. Updated 5 months ago.

Status:ResolvedStart date:13 Feb 2017
Priority:NormalDue date:
Assignee:pospelov% Done:

0%

Category:-
Target version:Sprint 34

Description

In SampleView:

  • Drag-and-drop sample to the canvas, open PyScriptView

The code of Python script will be generated

  • Select multilayer and start to move it across the canvas.
  • Materials in PythonView start to jump

Sometimes code will look like

    material_2 = ba.HomogeneousMaterial("example05_PartA", 5.00000000003e-06, 0.0)
    material_3 = ba.HomogeneousMaterial("example05_PartB", 9.99999999995e-06, 0.0)
    material_12 = ba.HomogeneousMaterial("example05_Substrate", 1.5e-05, 0.0)
    material_1 = ba.HomogeneousMaterial("example05_Air", 0.0, 0.0)

And sometimes

    material_3 = ba.HomogeneousMaterial("example05_PartB", 9.99999999995e-06, 0.0)
    material_2 = ba.HomogeneousMaterial("example05_PartA", 5.00000000003e-06, 0.0)
    material_12 = ba.HomogeneousMaterial("example05_Substrate", 1.5e-05, 0.0)
    material_1 = ba.HomogeneousMaterial("example05_Air", 0.0, 0.0)

Note the changing (and unsorted) material order.

In release 1.6.1 it was working, in 1.7.0 already broken. It should be connected with the fact, that LabelMap doesn't preserve the order of insertion.

History

#1 Updated by pospelov 6 months ago

  • Status changed from New to Sprint
  • Priority changed from Low to Normal
  • Target version set to Sprint 34

I find it's a very irritating behavior during real time demos. Adding to sprint...

#2 Updated by pospelov 5 months ago

  • Assignee set to pospelov

#3 Updated by pospelov 5 months ago

  • Status changed from Sprint to Resolved

Also available in: Atom PDF