[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    patch: KIllustrator
From:       Werner Trobin <wtrobin () mandrakesoft ! com>
Date:       2000-09-01 10:48:21
[Download RAW message or body]

Hi!

When you changed the global unit setting the rulers
didn't "notice"

-- 
Werner Trobin - wtrobin@mandrakesoft.com
["killu.diff" (text/plain)]

Index: koffice/KIllustrator_view.cc
===================================================================
RCS file: /home/kde/koffice/killustrator/koffice/KIllustrator_view.cc,v
retrieving revision 1.80
diff -b -u -p -r1.80 KIllustrator_view.cc
--- koffice/KIllustrator_view.cc	2000/08/29 18:07:21	1.80
+++ koffice/KIllustrator_view.cc	2000/09/01 10:43:57
@@ -307,8 +307,10 @@ void KIllustratorView::setupCanvas()
     MeasurementUnit mu = PStateManager::instance ()->defaultMeasurementUnit ();
     hRuler = new Ruler (Ruler::Horizontal, mu, this);
     hRuler->setGeometry(30, 0, width()-30, 30);
+    hRuler->setMeasurementUnit(PStateManager::instance()->defaultMeasurementUnit());
     vRuler = new Ruler (Ruler::Vertical, mu, this);
     vRuler->setGeometry(0, 30, 30, height()-30);
+    vRuler->setMeasurementUnit(PStateManager::instance()->defaultMeasurementUnit());
 
     scrollview = new QScrollView(this);
     scrollview->setGeometry(30, 30, width()-30, height()-30);
@@ -336,6 +338,7 @@ void KIllustratorView::setupCanvas()
                       vRuler, SLOT(updatePointer(int, int)));
     QObject::connect (canvas, SIGNAL(rightButtonAtSelectionClicked (int, int)),
                       this, SLOT(popupForSelection (int, int)));
+    connect(PStateManager::instance(), SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged()));
 
     // helpline creation
     connect (hRuler, SIGNAL (drawHelpline(int, int, bool)),
@@ -1176,6 +1179,11 @@ void KIllustratorView::slotZoomFactorCha
             break;
         }
     }
+}
+
+void KIllustratorView::slotSettingsChanged() {
+    hRuler->setMeasurementUnit(PStateManager::instance()->defaultMeasurementUnit());
+    vRuler->setMeasurementUnit(PStateManager::instance()->defaultMeasurementUnit());
 }
 
 #include <KIllustrator_view.moc>
Index: koffice/KIllustrator_view.h
===================================================================
RCS file: /home/kde/koffice/killustrator/koffice/KIllustrator_view.h,v
retrieving revision 1.33
diff -b -u -p -r1.33 KIllustrator_view.h
--- koffice/KIllustrator_view.h	2000/08/29 18:07:21	1.33
+++ koffice/KIllustrator_view.h	2000/09/01 10:43:58
@@ -181,6 +181,7 @@ private slots:
     void slotConfigureEllipse();
     void slotAddHelpline(int x, int y, bool d);
     void slotZoomFactorChanged(float factor);
+    void slotSettingsChanged();
 
 protected:
     KIllustratorDocument *m_pDoc;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic