QTfrontend/igbox.cpp
changeset 1424 2b45d88716b0
parent 1248 8c77eec56bf4
child 1810 4059cafd1da7
--- a/QTfrontend/igbox.cpp	Sun Oct 26 15:02:55 2008 +0000
+++ b/QTfrontend/igbox.cpp	Sun Oct 26 17:17:07 2008 +0000
@@ -30,22 +30,25 @@
 
 void IconedGroupBox::setIcon(const QIcon & icon)
 {
+	if (this->icon.isNull())
+		setStyleSheet(QString(
+			"IconedGroupBox{"
+				"margin-top: 46px;"
+				"margin-left: 12px;"
+				"padding: 22px 0px 0px 0px;"
+				"}"
+			"IconedGroupBox::title{"
+				"subcontrol-origin: margin;"
+				"subcontrol-position: top left;"
+				"padding-left: %1px;"
+				"padding-top: 26px;"
+				"text-align: left;"
+				"}"
+				).arg(padding)
+		);
+
 	this->icon = icon;
-	setStyleSheet(QString(
-		"IconedGroupBox{"
-			"margin-top: 46px;"
-			"margin-left: 12px;"
-			"padding: 22px 0px 0px 0px;"
-			"}"
-		"IconedGroupBox::title{"
-			"subcontrol-origin: margin;"
-			"subcontrol-position: top left;"
-			"padding-left: %1px;"
-			"padding-top: 26px;"
-			"text-align: left;"
-			"}"
-			).arg(padding)
-	);
+	repaint();
 }
 
 void IconedGroupBox::paintEvent(QPaintEvent * event)