some further little optimization

Thu, 01 Aug 2013 03:50:13 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 01 Aug 2013 03:50:13 +0300
changeset 414
0f40c56fde23
parent 413
a52c30a4c041
child 415
6598e3f9c673

some further little optimization

src/gui_actions.cpp file | annotate | diff | comparison | revisions
src/gui_editactions.cpp file | annotate | diff | comparison | revisions
--- a/src/gui_actions.cpp	Thu Aug 01 03:44:38 2013 +0300
+++ b/src/gui_actions.cpp	Thu Aug 01 03:50:13 2013 +0300
@@ -331,11 +331,12 @@
 	for (LDObject* obj : objs) {
 		LDFile::current()->insertObj (idx, obj);
 		g_win->sel() << obj;
+		g_win->R()->compileObject( obj );
 		
 		idx++;
 	}
 	
-	g_win->fullRefresh();
+	g_win->refresh();
 	g_win->scrollToSelection();
 }
 
@@ -392,10 +393,11 @@
 		
 		LDFile::current()->insertObj (idx, obj);
 		g_win->sel() << obj;
+		g_win->R()->compileObject( obj );
 		idx++;
 	}
 	
-	g_win->fullRefresh();
+	g_win->refresh();
 	g_win->scrollToSelection();
 }
 
@@ -433,7 +435,7 @@
 	for (LDObject* obj : g_win->sel())
 		obj->setHidden (!obj->hidden());
 	
-	g_win->fullRefresh();
+	g_win->refresh();
 }
 
 DEFINE_ACTION (Wireframe, 0) {
--- a/src/gui_editactions.cpp	Thu Aug 01 03:44:38 2013 +0300
+++ b/src/gui_editactions.cpp	Thu Aug 01 03:50:13 2013 +0300
@@ -137,6 +137,7 @@
 			LDObject* newobj = parseLine (line);
 			LDFile::current()->insertObj (idx++, newobj);
 			g_win->sel() << newobj;
+			g_win->R()->compileObject( inlineobj );
 		}
 		
 		// Delete the subfile now as it's been inlined.
@@ -144,7 +145,7 @@
 		delete obj;
 	}
 	
-	g_win->fullRefresh();
+	g_win->refresh();
 }
 
 DEFINE_ACTION (Inline, CTRL (I)) {
@@ -179,6 +180,9 @@
 		LDFile::current()->setObject (index, triangles[0]);
 		LDFile::current()->insertObj (index + 1, triangles[1]);
 		
+		for( LDTriangleObject* t : triangles )
+			g_win->R()->compileObject( t );
+		
 		// Delete this quad now, it has been split.
 		delete obj;
 		
@@ -186,7 +190,7 @@
 	}
 	
 	log ("%1 quadrilaterals split", num);
-	g_win->fullRefresh();
+	g_win->refresh();
 }
 
 // =============================================================================
@@ -496,11 +500,12 @@
 		}
 		
 		obj->setVertex (i, v);
+		g_win->R()->compileObject( obj );
 		num += 3;
 	}
 	
 	log (ForgeWindow::tr ("Rounded %1 coordinates"), num);
-	g_win->fullRefresh();
+	g_win->refresh();
 }
 
 // =============================================================================
@@ -519,11 +524,12 @@
 			col = edgecolor;
 		
 		obj->setColor (col);
+		g_win->R()->compileObject( obj );
 		num++;
 	}
 	
 	log (ForgeWindow::tr ("%1 objects uncolored"), num);
-	g_win->fullRefresh();
+	g_win->refresh();
 }
 
 // =============================================================================
@@ -564,10 +570,11 @@
 		}
 		
 		obj->setVertex (i, v);
+		g_win->R()->compileObject( obj );
 	}
 	
 	log (ForgeWindow::tr ("Altered %1 values"), num);
-	g_win->fullRefresh();
+	g_win->refresh();
 }
 
 // ================================================================================================

mercurial