Walls and objects are added with there measurments showing by default,
Walls and objects are added with there measurments showing by default,
objects dont show depth by default.

--- a/source/lib/scripts/CabinetEditor/Tools/Item/AddCabinetTool.js
+++ b/source/lib/scripts/CabinetEditor/Tools/Item/AddCabinetTool.js
@@ -8,8 +8,10 @@
 	[
 
 	 	'CabinetEditor/Schematic/SchematicObject',
+	 	'CabinetEditor/Schematic/Other/Measurements/ObjMeasurement',
 	 	'CabinetEditor/Tools/Tool',
 	 	'CabinetEditor/Tools/Item/EditCabinetTool',
+	 	'CabinetEditor/Defines/Cardinal',
 
 	 	'CabinetEditor/Config',
 	 	'CabinetEditor/Helper',
@@ -21,8 +23,10 @@
 	 function(
 
 		SchematicObject,
+		ObjMeasurement,
 		Tool,
 		cabinet_Tool,
+		Cardinal,
 
 		Config,
 		Helper,
@@ -74,6 +78,7 @@
 
 		if(Tool.wasDragging(this.downPoint, this.realDownPoint, pt, 3.0)
 			&& this.editor.collisions.length == 0){
+
 			this.cabinet.id = this.editor.schematic.newID();
 			this.editor.schematic.objects.push(this.cabinet);
 			this.editor.setLayer(this.cabinet.getLayer());
@@ -89,6 +94,12 @@
 						}
 				}
 			);
+
+			// Add front measurement for new object
+			var measurement = new ObjMeasurement(this.editor.schematic.newID(), 0, this.cabinet.h / 2 + 5, true, Cardinal.N);
+ 			measurement.objectID = this.cabinet.getID();
+ 			measurement.rebuildReferences(this.editor.schematic);
+ 			this.editor.addObject(measurement);
 
 			this.editor.setTool(new cabinet_Tool(this.editor));
 			this.editor.calculateCabinetGroupings();

--- a/source/lib/scripts/CabinetEditor/Tools/Wall/EditWallTool.js
+++ b/source/lib/scripts/CabinetEditor/Tools/Wall/EditWallTool.js
@@ -9,6 +9,7 @@
 	 	'CabinetEditor/Tools/Tool',
 	 	'CabinetEditor/Schematic/Other/Wall',
 	 	'CabinetEditor/Schematic/SchematicObject',
+	 	'CabinetEditor/Schematic/Other/Measurements/WallMeasurement',
 
 	 	'CabinetEditor/Helper',
 
@@ -23,6 +24,8 @@
 		Tool,
 		Wall,
 		SchematicObject,
+		WallMeasurement,
+
 		Helper,
 
 		UI,
@@ -183,7 +186,7 @@
 							
 							for(i = 0; i < linesLength; i++){
 
-								var p2p = new LineSegment(lines[i].p1, lines[i].p2).nearestPointToPoint(splitPoints[0]);
+								var p2p = new LineSegment(lines[i].p1, lines[i].p2).nearestPointToLine(splitPoints[0]);
 								var distance = p2p.distanceToPoint(splitPoints[0]);
 
 								if(distance < 0.1){
@@ -207,6 +210,22 @@
 						// TODO: Speed up this process! More Efficient!
 						this.editor.schematic.clearProximityCache();
 						this.editor.schematic.rebuildProximityCache();
+
+						// Add measurements to wall
+						// TODO Make sure we apply measures to all new wall segemnts without them
+						//this.tmp_wall = this.editor.schematic.objects[this.editor.schematic.objects.length - 1];
+						// TODO force rebuild of sliced wall measuremnets
+
+						this.tmp_wall.measureSide1 = new WallMeasurement(this.editor.schematic.newID(), 0, 10, true, 1);
+			 			this.tmp_wall.measureSide1.objectID = this.tmp_wall.getID();
+			 			this.tmp_wall.measureSide1.rebuildReferences(this.editor.schematic);
+			 			this.tmp_wall.measureSide1.recalculateCachedProperties();
+			 			this.editor.addObject(this.tmp_wall.measureSide1);
+			 			this.tmp_wall.measureSide2 = new WallMeasurement(this.editor.schematic.newID(), 0, -10, true, 2);
+			 			this.tmp_wall.measureSide2.objectID = this.tmp_wall.getID();
+			 			this.tmp_wall.measureSide2.rebuildReferences(this.editor.schematic);
+			 			this.tmp_wall.measureSide2.recalculateCachedProperties();
+			 			this.editor.addObject(this.tmp_wall.measureSide2);
 
 						this.tmp_wall = null;