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

List:       kde-commits
Subject:    kdeextragear-2/kst/kst
From:       George Staikos <staikos () kde ! org>
Date:       2004-05-31 21:43:52
Message-ID: 20040531214352.EF32D126EB () office ! kde ! org
[Download RAW message or body]

CVS commit by staikos: 

- initialize variables
- start the label tool code


  M +10 -0     kst2dplot.cpp   1.49
  M +4 -1      kstviewobject.cpp   1.54


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.48:1.49
@@ -1785,4 +1785,9 @@ void Kst2DPlot::mouseMoveEvent(QWidget *
   int iWidth, iHeight;
   int i_label = -1;
+
+  if (globalZoomType() == LABEL_TOOL) { // HACK
+    _mouse.mode = LABEL_TOOL;
+  }
+
   if (e->state() & Qt::LeftButton && _mouse.mode == LABEL_TOOL &&
         (i_label = _mouse.label) >= 0 /*&& _draggableLabel == i_label*/) {
@@ -2216,4 +2221,9 @@ void Kst2DPlot::setCursorForMode(QWidget
 
 void Kst2DPlot::keyReleaseEvent(QWidget *view, QKeyEvent *e) {
+  if (_mouse.mode == LABEL_TOOL) {
+    e->ignore();
+    return;
+  }
+
   ButtonState s = e->stateAfter();
   KstMouseModeType newType;

--- kdeextragear-2/kst/kst/kstviewobject.cpp  #1.53:1.54
@@ -39,5 +39,5 @@
 #include "kst.h"
 
-KstViewObject::KstViewObject(const QString& type) : KstObject(), _geom(0, 0, 1, 1), \
_focus(false), _selected(false), _type(type) { +KstViewObject::KstViewObject(const \
QString& type) : KstObject(), _geom(0, 0, 1, 1), _type(type) {  _standardActions = 0;
   _layoutActions = 0;
@@ -47,4 +47,5 @@ KstViewObject::KstViewObject(const QStri
   _columns = 1;
   _focus = false;
+  _selected = false;
 }
 
@@ -57,4 +58,6 @@ KstViewObject::KstViewObject(QDomElement
   _columns = 1;
   _focus = false;
+  _selected = false;
+  _geom = QRect(0, 0, 1, 1);
 
   QDomNode n = e.firstChild();


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

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