Code

Make order of 'auto' swatches match order in document.
authorJon A. Cruz <jon@joncruz.org>
Sat, 3 Jul 2010 23:02:57 +0000 (16:02 -0700)
committerJon A. Cruz <jon@joncruz.org>
Sat, 3 Jul 2010 23:02:57 +0000 (16:02 -0700)
src/ui/dialog/swatches.cpp

index 755a10519c2e1f02219a3af6065b6e265991df0f..70e3800a08814928c63c9e67c6b187b88adfda5f 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <errno.h>
 #include <map>
+#include <algorithm>
 
 #include <gtk/gtkdialog.h> //for GTK_RESPONSE* types
 #include <gtk/gtkdnd.h>
@@ -805,6 +806,7 @@ static void recalcSwatchContents(SPDocument* doc,
     }
 
     if ( !newList.empty() ) {
+        std::reverse(newList.begin(), newList.end());
         for ( std::vector<SPGradient*>::iterator it = newList.begin(); it != newList.end(); ++it )
         {
             SPGradient* grad = *it;