[Kst] branches/work/kst/1.6/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Wed Nov 14 23:28:31 CET 2007


SVN commit 736822 by arwalker:

correctly display line style combobox

 M  +19 -3     ksteditviewobjectdialog_i.cpp  
 M  +3 -0      ksteditviewobjectdialog_i.h  


--- branches/work/kst/1.6/kst/src/libkstapp/ksteditviewobjectdialog_i.cpp #736821:736822
@@ -169,8 +169,7 @@
 }
 
 
-void KstEditViewObjectDialogI::populateEditMultiple()
-{
+void KstEditViewObjectDialogI::populateEditMultiple() {
   QSpinBox *spinBoxWidget;
   KColorButton *colorButtonWidget;
   KURLRequester *urlRequester;
@@ -405,7 +404,7 @@
     pen.setStyle(styles.front());
     pp.setPen(pen);
     pp.fillRect( pp.window(), QColor("white"));
-    pp.drawLine(1,ppix.height()/2,ppix.width()-1, ppix.height()/2);
+    pp.drawLine(1, ppix.height()/2, ppix.width()-1, ppix.height()/2);
     widget->insertItem(ppix);
     styles.pop_front();
   }
@@ -582,5 +581,22 @@
 }
 
 
+void KstEditViewObjectDialogI::resizeEvent(QResizeEvent *event) {
+  Q_UNUSED(event)
+
+  if (!_customWidget) {
+    for (QValueList<QWidget*>::ConstIterator iter = _inputWidgets.begin(); iter != _inputWidgets.end(); ++iter) {
+      if (strcmp((*iter)->name(), "lineStyle,currentItem") == 0) {
+        QComboBox* combo = dynamic_cast<QComboBox*>(*iter);
+        if (combo != 0L) {
+          int currentItem = combo->currentItem();
+          fillPenStyleWidget(combo);
+          combo->setCurrentItem(currentItem);
+        }
+      }
+    }
+  }
+}
+
 #include "ksteditviewobjectdialog_i.moc"
 
--- branches/work/kst/1.6/kst/src/libkstapp/ksteditviewobjectdialog_i.h #736821:736822
@@ -45,6 +45,9 @@
     void setDefaults();
     void restoreDefaults();
 
+  protected:
+   virtual void resizeEvent(QResizeEvent *e);
+
   private:
     void updateWidgets();
     void clearWidgets();


More information about the Kst mailing list