Index: cpp/frams/canvas/neurodiagram.cpp
===================================================================
--- cpp/frams/canvas/neurodiagram.cpp	(revision 896)
+++ cpp/frams/canvas/neurodiagram.cpp	(revision 973)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -136,5 +136,5 @@
 		int *xywh = GetXYWH(el);
 		XY[0] = 0;
-		XY[1] = ((1 + i)*xywh[3]) / (GetInputs(el) + 1);
+		XY[1] = ((1 + i) * xywh[3]) / (GetInputs(el) + 1);
 		return XY;
 	}
@@ -230,6 +230,6 @@
 	if (i >= countNeurons()) return;
 	NeuroProbe *probe = new NeuroProbe(getNS(i));
-	Pixel s=getSize();
-	s.x=s.y=max(probe->getSize().x,min(s.x/3,s.y/3));
+	Pixel s = getSize();
+	s.x = s.y = max(probe->getSize().x, min(s.x / 3, s.y / 3));
 	probes += (void*)probe;
 	add(probe);
@@ -255,5 +255,5 @@
 	addNeuroDescription(tooltip, n);
 	label += n->getClassName();
-	if (n->getClassParams().len())
+	if (n->getClassParams().length())
 	{
 		tooltip += "\n"; tooltip += n->getClassParams();
@@ -319,5 +319,5 @@
 				*/
 
-	// NeuroSymbol is also responsible for drawing connection lines from its inputs to other NeuroSymbols' outputs
+				// NeuroSymbol is also responsible for drawing connection lines from its inputs to other NeuroSymbols' outputs
 	NeuroSymbol *ns2;
 	if (!diagram.isLive())
@@ -350,5 +350,5 @@
 			{
 				y2 = pos.y - yw / 3;
-				if ((ns2->pos.y<pos.y) && (ns2->pos.y>(pos.y - ns2->size.y))) y2 -= pos.y - ns2->pos.y;
+				if ((ns2->pos.y < pos.y) && (ns2->pos.y > (pos.y - ns2->size.y))) y2 -= pos.y - ns2->pos.y;
 			}
 			// note: "diagram" uses global coordinate system, so we add "pos" or "ns2->pos" to get NeuroSymbol's global positions
@@ -413,5 +413,5 @@
 int NeuroSymbol::inputY(int i)
 {
-	return (1 + i)*size.y / ((n->getInputCount()) + 1);
+	return (1 + i) * size.y / ((n->getInputCount()) + 1);
 }
 
@@ -421,23 +421,23 @@
 		if (x < size.x / 4)
 		{ // inputs?
-		if (n->getInputCount() > 0)
-		{
-			int i = (y*n->getInputCount()) / size.y;
-			double w;
-			Neuro* target = n->getInput(i, w);
-			if (target)
+			if (n->getInputCount() > 0)
 			{
-				SString t = "connected to #";
-				t += SString::valueOf((int)target->refno);
-				t += " - ";
-				addNeuroDescription(t, target);
-				//		if (w!=1.0)
+				int i = (y * n->getInputCount()) / size.y;
+				double w;
+				Neuro* target = n->getInput(i, w);
+				if (target)
 				{
-					t += ", weight=";
-					t += SString::valueOf(w);
+					SString t = "connected to #";
+					t += SString::valueOf((int)target->refno);
+					t += " - ";
+					addNeuroDescription(t, target);
+					//		if (w!=1.0)
+					{
+						t += ", weight=";
+						t += SString::valueOf(w);
+					}
+					return t;
 				}
-				return t;
 			}
-		}
 		}
 	return CanvasWindow::hint(x, y);
@@ -448,5 +448,5 @@
 NeuroProbe::NeuroProbe(NeuroSymbol* ns)
 	:DCanvasWindow(DCanvasWindow::Title + DCanvasWindow::Border + DCanvasWindow::Close + DCanvasWindow::Size,
-	ns->getLabel().c_str(), &neurochart, &neurochart)
+		ns->getLabel().c_str(), &neurochart, &neurochart)
 {
 	holdismine = 0;
@@ -515,6 +515,6 @@
 					while (*dr != NeuroImpl::ENDDRAWING)
 					{
-						int x = ((*(dr++))*scale) / (NeuroImpl::MAXDRAWINGXY + 1) + x0;
-						int y = ((*(dr++))*scale) / (NeuroImpl::MAXDRAWINGXY + 1) + y0;
+						int x = ((*(dr++)) * scale) / (NeuroImpl::MAXDRAWINGXY + 1) + x0;
+						int y = ((*(dr++)) * scale) / (NeuroImpl::MAXDRAWINGXY + 1) + y0;
 						if (first) { moveTo(x, y); first = 0; }
 						else lineTo(x, y);
@@ -577,5 +577,5 @@
 	{
 		double st = neurochart.unmapData(unmapClientY(y));
-		if (st<-1.0) st = -1.0; else if (st>1.0) st = 1.0;
+		if (st < -1.0) st = -1.0; else if (st > 1.0) st = 1.0;
 		if (chsel == 0)
 			link->n->state = st;
@@ -602,5 +602,5 @@
 		int sy = size.y;
 		if (chsel >= 0) sy -= textHeight();
-		return ((y<sy) && (y>(sy - textHeight())));
+		return ((y < sy) && (y > (sy - textHeight())));
 	}
 	return 0;
@@ -635,5 +635,5 @@
 		{
 			link->n->flags ^= Neuro::HoldState;
-			holdismine = ((link->n->flags&Neuro::HoldState) != 0);
+			holdismine = ((link->n->flags & Neuro::HoldState) != 0);
 			requestPaint();
 			return LeftButton;
@@ -645,6 +645,6 @@
 SString NeuroProbe::hint(int x, int y)
 {
-	if ((chsel >= 0) && (x<size.x - 16) && (y>size.y - 16))
-		return SString((link->n->flags&Neuro::HoldState) ? "Click to release" : "Click to hold");
+	if ((chsel >= 0) && (x < size.x - 16) && (y > size.y - 16))
+		return SString((link->n->flags & Neuro::HoldState) ? "Click to release" : "Click to hold");
 	else if (insideChSelector(x, y))
 		return SString::sprintf("channel %d of %d (click and drag to switch channels)", chsel, chnum);
