Code

Rework dialog management. Use singleton behavior for dialogs when
[inkscape.git] / src / dialogs / swatches.cpp
index 829b06cb6009a88f71c7b07eb007f76c6b4b34c2..e4cf9e9265f7f51b8f190fc862b86d543bd5a72b 100644 (file)
@@ -41,8 +41,6 @@ namespace Inkscape {
 namespace UI {
 namespace Dialogs {
 
-SwatchesPanel* SwatchesPanel::instance = 0;
-
 
 ColorItem::ColorItem( unsigned int r, unsigned int g, unsigned int b, Glib::ustring& name ) :
     def( r, g, b, name ),
@@ -989,11 +987,7 @@ static void loadEmUp()
 
 SwatchesPanel& SwatchesPanel::getInstance()
 {
-    if ( !instance ) {
-        instance = new SwatchesPanel();
-    }
-
-    return *instance;
+    return *new SwatchesPanel();
 }