| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6ff9f6f commit feaa300
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,14 @@ | |||
| 2 | 2 | ||
| 3 | 3 | * src/show.c: Clarify the current "set clip" settings in "show clip". | |
| 4 | 4 | ||
| 5 | + * src/term_api.h src/graph3d.c: Send TERM_LAYER_3DPLOT to the terminal | ||
| 6 | + at the start of an splot. | ||
| 7 | + | ||
| 8 | + * src/qtterminal/QtGnuplotScene.{cpp|h} src/qtterminal/qt_term.cpp: | ||
| 9 | + If the current plot is 3D, do not update the status dispplay of x/y | ||
| 10 | + coordinates in response to a mouse move event. | ||
| 11 | + Bug #1605 | ||
| 12 | + | ||
| 5 | 13 | 2015-06-01 Daniel J Sebald <daniel.sebald@ieee.org> | |
| 6 | 14 | ||
| 7 | 15 | * src/mouse.c (event_buttonrelease): Improved bookkeeping for which | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -470,6 +470,7 @@ void QtGnuplotScene::processEvent(QtGnuplotEventType type, QDataStream& in) | |||
| 470 | 470 | { | |
| 471 | 471 | for (int i = 0; i < 4; i++) | |
| 472 | 472 | in >> m_axisValid[i] >> m_axisMin[i] >> m_axisLower[i] >> m_axisScale[i] >> m_axisLog[i]; | |
| 473 | + in >> m_axisValid[4]; | ||
| 473 | 474 | } | |
| 474 | 475 | else if (type == GEAfterPlot) | |
| 475 | 476 | { | |
@@ -776,21 +777,25 @@ void QtGnuplotScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) | |||
| 776 | 777 | // Mousing for inactive widgets | |
| 777 | 778 | if (!m_widget->isActive()) | |
| 778 | 779 | { | |
| 779 | - m_lineTo->hide(); | ||
| 780 | - QString status; | ||
| 781 | - if (m_axisValid[0]) | ||
| 782 | - status += QString("x = ") | ||
| 783 | - + QString::number(sceneToGraph(0,event->scenePos().x())); | ||
| 784 | - if (m_axisValid[1]) | ||
| 785 | - status += QString(" y = ") | ||
| 786 | - + QString::number(sceneToGraph(1,event->scenePos().y())); | ||
| 787 | - if (m_axisValid[2]) | ||
| 788 | - status += QString(" x2 = ") | ||
| 789 | - + QString::number(sceneToGraph(2,event->scenePos().x())); | ||
| 790 | - if (m_axisValid[3]) | ||
| 791 | - status += QString(" y2 = ") | ||
| 792 | - + QString::number(sceneToGraph(3,event->scenePos().y())); | ||
| 793 | - m_widget->setStatusText(status); | ||
| 780 | + if (m_axisValid[4]) { | ||
| 781 | + ; // 3D plot - no mouse coordinate update | ||
| 782 | + } else { | ||
| 783 | + m_lineTo->hide(); | ||
| 784 | + QString status; | ||
| 785 | + if (m_axisValid[0]) | ||
| 786 | + status += QString("x = ") | ||
| 787 | + + QString::number(sceneToGraph(0,event->scenePos().x())); | ||
| 788 | + if (m_axisValid[1]) | ||
| 789 | + status += QString(" y = ") | ||
| 790 | + + QString::number(sceneToGraph(1,event->scenePos().y())); | ||
| 791 | + if (m_axisValid[2]) | ||
| 792 | + status += QString(" x2 = ") | ||
| 793 | + + QString::number(sceneToGraph(2,event->scenePos().x())); | ||
| 794 | + if (m_axisValid[3]) | ||
| 795 | + status += QString(" y2 = ") | ||
| 796 | + + QString::number(sceneToGraph(3,event->scenePos().y())); | ||
| 797 | + m_widget->setStatusText(status); | ||
| 798 | + } | ||
| 794 | 799 | QGraphicsScene::mouseMoveEvent(event); | |
| 795 | 800 | return; | |
| 796 | 801 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -130,7 +130,7 @@ Q_OBJECT | |||
| 130 | 130 | QGraphicsPixmapItem* m_hyperimage; | |
| 131 | 131 | ||
| 132 | 132 | // Axis scales | |
| 133 | - bool m_axisValid[4]; | ||
| 133 | + bool m_axisValid[5]; // x, y, x2, y2, z (indicates 3D plot) | ||
| 134 | 134 | double m_axisMin [4]; | |
| 135 | 135 | double m_axisLower[4]; | |
| 136 | 136 | double m_axisScale[4]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -188,6 +188,7 @@ static bool qt_setPosition = false; | |||
| 188 | 188 | static bool qt_setSize = true; | |
| 189 | 189 | static int qt_setWidth = qt_optionWidth; | |
| 190 | 190 | static int qt_setHeight = qt_optionHeight; | |
| 191 | + static bool qt_is_3Dplot = false; | ||
| 191 | 192 | ||
| 192 | 193 | /* ------------------------------------------------------ | |
| 193 | 194 | * Helpers | |
@@ -537,7 +538,7 @@ void qt_text_wrapper() | |||
| 537 | 538 | if (!qt) | |
| 538 | 539 | return; | |
| 539 | 540 | ||
| 540 | - // Remember scale to update the status bar while the plot is inactive | ||
| 541 | + // Remember scale so that we can update the status bar while the plot is inactive | ||
| 541 | 542 | qt->out << GEScale; | |
| 542 | 543 | ||
| 543 | 544 | const int axis_order[4] = {FIRST_X_AXIS, FIRST_Y_AXIS, SECOND_X_AXIS, SECOND_Y_AXIS}; | |
@@ -557,6 +558,9 @@ void qt_text_wrapper() | |||
| 557 | 558 | qt->out << lower/qt_oversamplingF << scale/qt_oversamplingF; | |
| 558 | 559 | qt->out << (axis_array[axis_order[i]].log ? axis_array[axis_order[i]].log_base : 0.); | |
| 559 | 560 | } | |
| 561 | + // Flag whether this was a 3D plot (not mousable in 'persist' mode) | ||
| 562 | + qt->out << qt_is_3Dplot; | ||
| 563 | + qt_is_3Dplot = false; | ||
| 560 | 564 | ||
| 561 | 565 | qt_text(); | |
| 562 | 566 | } | |
@@ -1451,6 +1455,8 @@ void qt_layer( t_termlayer syncpoint ) | |||
| 1451 | 1455 | qt->out << GELayer << QTLAYER_END_KEYSAMPLE; break; | |
| 1452 | 1456 | case TERM_LAYER_BEFORE_ZOOM: | |
| 1453 | 1457 | qt->out << GELayer << QTLAYER_BEFORE_ZOOM; break; | |
| 1458 | + case TERM_LAYER_3DPLOT: | ||
| 1459 | + qt_is_3Dplot = true; break; | ||
| 1454 | 1460 | default: | |
| 1455 | 1461 | break; | |
| 1456 | 1462 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments