File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
src/main/java/eu/mihosoft/vrl/v3d Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ public MeshView newMesh() {
339339 PhongMaterial m = new PhongMaterial (getColor ());
340340 current .setMaterial (m );
341341
342- boolean hasManipulator = getManipulator () != null ;
342+ boolean hasManipulator = hasManipulator () ;
343343 boolean hasAssembly = getAssemblyStorage ().getValue ("AssembleAffine" ) != Optional .empty ();
344344
345345 if (hasManipulator || hasAssembly )
@@ -3138,9 +3138,11 @@ public CSG regenerate() {
31383138 if (regenerate == null )
31393139 return this ;
31403140 CSG regenerate2 = regenerate .get (getUniqueId ()).regenerate (this );
3141- if (regenerate2 != null )
3142- return regenerate2 .setManipulator (this .getManipulator ()).historySync (this );
3143- ;
3141+ if (regenerate2 != null ) {
3142+ if (hasManipulator ())
3143+ regenerate2 .setManipulator (this .getManipulator ());
3144+ return regenerate2 .historySync (this );
3145+ }
31443146 return this ;
31453147 }
31463148
Original file line number Diff line number Diff line change @@ -99,8 +99,9 @@ public Set<String> getParameters(CSG instance) {
9999 public CSGDatabaseInstance setParameterNewValue (CSG instance , String key , double newValue ) {
100100 IParametric function = getMapOfparametrics (instance ).get (key );
101101 if (function != null ) {
102- CSG setManipulator = function .change (instance , key , new Long ((long ) (newValue * 1000 )))
103- .setManipulator (instance .getManipulator ());
102+ CSG setManipulator = function .change (instance , key , new Long ((long ) (newValue * 1000 )));
103+ if (setManipulator .hasManipulator ())
104+ setManipulator .setManipulator (instance .getManipulator ());
104105 setManipulator .setColor (instance .getColor ());
105106 return this ;
106107 }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public static Bounds getSellectedBounds(List<CSG> incoming) {
7070 public static WritableImage get (List <CSG > c ,CSGDatabaseInstance instance ) {
7171 ArrayList <CSG > csgList = new ArrayList <CSG >();
7272 for (CSG cs : c ) {
73- if (cs .getManipulator () != null ) {
73+ if (cs .hasManipulator () ) {
7474 csgList .add (cs .transformed (TransformConverter .fromAffine (cs .getManipulator ())).syncProperties (instance ,cs ));
7575 } else
7676 csgList .add (cs );
You can’t perform that action at this time.
0 commit comments