Code

Fixed missing palette when using file open on a new document.
authorJon A. Cruz <jon@joncruz.org>
Fri, 19 Mar 2010 06:50:27 +0000 (23:50 -0700)
committerJon A. Cruz <jon@joncruz.org>
Fri, 19 Mar 2010 06:50:27 +0000 (23:50 -0700)
src/ui/dialog/swatches.cpp

index 76ceb1514dd072afbbf3cf2f1ef831edf56d22bc..6f013f4f3d26580959edbcfb80f77c7f072910ef 100644 (file)
@@ -610,7 +610,6 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop )
             _documentConnection = desktop->connectDocumentReplaced( slot2 );
 
             _setDocument( desktop->doc() );
-            handleGradientsChange( desktop->doc() );
         } else {
             _setDocument(0);
         }
@@ -709,6 +708,7 @@ void SwatchesPanel::_setDocument( SPDocument *document )
     if ( document != _currentDocument ) {
         _trackDocument(this, document);
         _currentDocument = document;
+        handleGradientsChange( document );
     }
 }