[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Jun 16 21:30:08 CEST 2004


CVS commit by staikos: 

don't allow labels and legends outside the plot rect


  M +10 -0     kst2dplot.cpp   1.91


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.90:1.91
@@ -3197,4 +3197,9 @@ void Kst2DPlot::dropEvent(QWidget *view,
       ds >> windowname >> plotname >> label >> hs;
 
+      if (!GetPlotRegion().contains(e->pos())) {
+        e->accept(false);
+        return;
+      }
+
       KstApp *app = KstApp::inst();
       KstViewWindow *w = dynamic_cast<KstViewWindow*>(app->findWindow(windowname));
@@ -3242,4 +3247,9 @@ void Kst2DPlot::dropEvent(QWidget *view,
       ds >> windowname >> plotname >> hs;
 
+      if (!GetPlotRegion().contains(e->pos())) {
+        e->accept(false);
+        return;
+      }
+
       KstApp *app = KstApp::inst();
       KstViewWindow *w = dynamic_cast<KstViewWindow*>(app->findWindow(windowname));





More information about the Kst mailing list