zz_addObjectDialog.cpp

changeset 41
4ca63da5546b
parent 40
215b9f8f0cd7
child 42
499c25af0303
--- a/zz_addObjectDialog.cpp	Wed Mar 20 01:58:05 2013 +0200
+++ b/zz_addObjectDialog.cpp	Wed Mar 20 02:31:36 2013 +0200
@@ -53,6 +53,8 @@
 	case OBJ_CondLine:
 		dCoordCount = 12;
 		break;
+	case OBJ_Vertex:
+		dCoordCount = 3;
 	default:
 		break;
 	}
@@ -91,7 +93,7 @@
 	setWindowTitle (str::mkfmt (APPNAME_DISPLAY " - new %s",
 		g_saObjTypeNames[type]).chars());
 	
-	setWindowIcon (QIcon (g_saObjTypeIcons[type]));
+	setWindowIcon (QIcon (str::mkfmt ("icons/add-%s.png", g_saObjTypeIcons[type]).chars ()));
 }
 
 // =============================================================================
@@ -157,6 +159,20 @@
 				g_CurrentFile->addObject (line);
 				window->refresh ();
 			}
+			break;
+		
+		case OBJ_Vertex:
+			{
+				LDVertex* vert = new LDVertex;
+				vert->dColor = dMainColor;
+				vert->vPosition.x = dlg.qaCoordinates[0]->value ();
+				vert->vPosition.y = dlg.qaCoordinates[1]->value ();
+				vert->vPosition.z = dlg.qaCoordinates[2]->value ();
+				
+				g_CurrentFile->addObject (vert);
+				window->refresh ();
+			}
+			break;
 		
 		default:
 			break;

mercurial