Add some missing icons

Sun, 19 May 2013 02:04:46 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sun, 19 May 2013 02:04:46 +0300
changeset 221
1dd18eea7c84
parent 220
1f368f0a323b
child 222
fddd36a6526c

Add some missing icons

icons/autocolor.png file | annotate | diff | comparison | revisions
icons/flip.png file | annotate | diff | comparison | revisions
icons/radial-convert.png file | annotate | diff | comparison | revisions
ldforge.qrc file | annotate | diff | comparison | revisions
src/gui.cpp file | annotate | diff | comparison | revisions
src/gui_editactions.cpp file | annotate | diff | comparison | revisions
Binary file icons/autocolor.png has changed
Binary file icons/flip.png has changed
Binary file icons/radial-convert.png has changed
--- a/ldforge.qrc	Sun May 19 01:31:13 2013 +0300
+++ b/ldforge.qrc	Sun May 19 02:04:46 2013 +0300
@@ -14,6 +14,7 @@
 	<file>./icons/arrow-left.png</file>
 	<file>./icons/arrow-right.png</file>
 	<file>./icons/arrow-up.png</file>
+	<file>./icons/autocolor.png</file>
 	<file>./icons/axes.png</file>
 	<file>./icons/bfc.png</file>
 	<file>./icons/brick-new.png</file>
@@ -44,6 +45,7 @@
 	<file>./icons/file.png</file>
 	<file>./icons/file-save-as.png</file>
 	<file>./icons/file-save.png</file>
+	<file>./icons/flip.png</file>
 	<file>./icons/folder.png</file>
 	<file>./icons/grid-coarse.png</file>
 	<file>./icons/grid-fine.png</file>
@@ -76,6 +78,7 @@
 	<file>./icons/qt.png</file>
 	<file>./icons/quad.png</file>
 	<file>./icons/quad-split.png</file>
+	<file>./icons/radial-convert.png</file>
 	<file>./icons/radial.png</file>
 	<file>./icons/rectifier.png</file>
 	<file>./icons/redo.png</file>
--- a/src/gui.cpp	Sun May 19 01:31:13 2013 +0300
+++ b/src/gui.cpp	Sun May 19 02:04:46 2013 +0300
@@ -221,7 +221,7 @@
 	addMenuAction ("invert");				// Invert
 	addMenuAction ("inlineContents");		// Inline
 	addMenuAction ("deepInline");			// Deep Inline
-	addMenuAction ("radialResolution");	// Radial Resolution
+	addMenuAction ("radialConvert");		// Radials to Subfiles
 	menu->addSeparator ();					// -----
 	addMenuAction ("splitQuads");			// Split Quads
 	addMenuAction ("setContents");		// Set Contents
@@ -394,7 +394,7 @@
 	addToolBarAction ("invert");
 	addToolBarAction ("inlineContents");
 	addToolBarAction ("deepInline");
-	addToolBarAction ("radialResolution");
+	addToolBarAction ("radialConvert");
 	addToolBarAction ("splitQuads");
 	addToolBarAction ("setContents");
 	addToolBarAction ("makeBorders");
--- a/src/gui_editactions.cpp	Sun May 19 01:31:13 2013 +0300
+++ b/src/gui_editactions.cpp	Sun May 19 02:04:46 2013 +0300
@@ -186,7 +186,7 @@
 // =======================================================================================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =======================================================================================================================================
-MAKE_ACTION (radialResolution, "Radial resolution", "radial-resolve", "Resolve radials into primitives.", (0)) {
+MAKE_ACTION (radialConvert, "Radials to Subfiles", "radial-convert", "Convert radials into primitives.", (0)) {
 	vector<str> fails;
 	vector<LDObject*> sel = g_win->sel ();
 	EditHistory* history = new EditHistory;
@@ -314,31 +314,32 @@
 	if (g_win->sel ().size() <= 0)
 		return;
 	
-	short dColor;
-	short dDefault = -1;
+	short colnum;
+	short defcol = -1;
 	
 	std::vector<LDObject*> objs = g_win->sel ();
 	
 	// If all selected objects have the same color, said color is our default
 	// value to the color selection dialog.
-	dDefault = g_win->getSelectedColor ();
+	defcol = g_win->getSelectedColor ();
 	
 	// Show the dialog to the user now and ask for a color.
-	if (ColorSelectDialog::staticDialog (dColor, dDefault, g_win)) {
-		std::vector<ulong> ulaIndices;
-		std::vector<short> daColors;
+	if (ColorSelectDialog::staticDialog (colnum, defcol, g_win)) {
+		std::vector<ulong> indices;
+		std::vector<short> colornums;
 		
 		for (LDObject* obj : objs) {
-			if (obj->color != -1) {
-				ulaIndices.push_back (obj->getIndex (g_curfile));
-				daColors.push_back (obj->color);
-				
-				obj->color = dColor;
-				g_win->R ()->compileObject (obj);
-			}
+			if (obj->isColored () == false)
+				continue;
+			
+			indices.push_back (obj->getIndex (g_curfile));
+			colornums.push_back (obj->color);
+			
+			obj->color = colnum;
+			g_win->R ()->compileObject (obj);
 		}
 		
-		History::addEntry (new SetColorHistory (ulaIndices, daColors, dColor));
+		History::addEntry (new SetColorHistory (indices, colornums, colnum));
 		g_win->refresh ();
 	}
 }
@@ -793,7 +794,7 @@
 	return false;
 }
 
-MAKE_ACTION (autoColor, "Auto-color", "auto-color", "Set the color of the given object to the first found unused color.", (0)) {
+MAKE_ACTION (autoColor, "Autocolor", "autocolor", "Set the color of the given object to the first found unused color.", (0)) {
 	short colnum = 0;
 	vector<ulong> indices;
 	vector<short> colors;

mercurial