[Kst] extragear/graphics/kst/kst
Andrew Walker
arwalker at sumusltd.com
Mon Aug 15 19:08:55 CEST 2005
SVN commit 449469 by arwalker:
BUG:110732 Set page correctly when displaying plot edit dialog resulting from the user clicking somewhere on a plot.
M +9 -3 kst2dplot.cpp
M +6 -6 kstplotdialog_i.h
--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #449468:449469
@@ -4289,13 +4289,19 @@
} else if (plot_and_axis_rect.contains(e->pos())) {
if (_draggableLabel == -1) {
ParentApp->plotDialog()->show_I(static_cast<KstViewWidget*>(view)->viewObject()->tagName(), tagName());
- ParentApp->plotDialog()->TabWidget->setCurrentPage(LIMITS_TAB);
+ if (e->pos().y() > plot_rect.bottom() && e->pos().x() < plot_rect.left()) {
+ ParentApp->plotDialog()->TabWidget->setCurrentPage(RANGE_TAB);
+ } else if (e->pos().y() > plot_rect.bottom()) {
+ ParentApp->plotDialog()->TabWidget->setCurrentPage(X_AXIS_TAB);
+ } else {
+ ParentApp->plotDialog()->TabWidget->setCurrentPage(Y_AXIS_TAB);
+ }
}
return;
} else if (win_rect.contains(e->pos())) {
if (_draggableLabel == -1) {
ParentApp->plotDialog()->show_I(static_cast<KstViewWidget*>(view)->viewObject()->tagName(), tagName());
- ParentApp->plotDialog()->TabWidget->setCurrentPage(LABELS_TAB);
+ ParentApp->plotDialog()->TabWidget->setCurrentPage(APPEARANCE_TAB);
}
return;
}
@@ -4472,7 +4478,7 @@
KstApp::inst()->labelDialog()->showI(this, i_label, x, y);
} else if (legendUnder(e)) {
KstApp::inst()->plotDialog()->show_I(static_cast<KstViewWidget*>(view)->viewObject()->tagName(), tagName());
- KstApp::inst()->plotDialog()->TabWidget->setCurrentPage(LEGEND_TAB);
+ KstApp::inst()->plotDialog()->TabWidget->setCurrentPage(APPEARANCE_TAB);
} else if (type == KstApp::GFX_LABEL && plotregion.contains(e->pos()) && _draggableLabel == -1) {
KstApp::inst()->labelDialog()->showI(this, -1, x, y);
}
--- trunk/extragear/graphics/kst/kst/kstplotdialog_i.h #449468:449469
@@ -23,12 +23,12 @@
class KstLabel;
class KMdiChildView;
-#define CONTENT_TAB 0
-#define LABELS_TAB 1
-#define LEGEND_TAB 1
-#define AXES_TAB 2
-#define LIMITS_TAB 3
-#define MARKERS_TAB 4
+#define CONTENT_TAB 0
+#define APPEARANCE_TAB 1
+#define X_AXIS_TAB 2
+#define Y_AXIS_TAB 3
+#define RANGE_TAB 4
+#define MARKERS_TAB 5
class KstPlotDialogI : public KstPlotDialog {
Q_OBJECT
More information about the Kst
mailing list