remove rubberband feature since undoing the zoom doesn't work properly

This commit is contained in:
Axel Kohlmeyer
2025-07-09 16:39:53 -04:00
parent dec1fd2b92
commit e09a87d121
3 changed files with 1 additions and 19 deletions

View File

@ -446,10 +446,6 @@ plot title and the y-axis label, respectively. The text entered in the
"Title:" box is applied to *all* charts, while the "Y:" text changes
only the y-axis label of the currently *selected* plot.
You can use the mouse to zoom into the graph (hold the left button and
drag to mark an area) or zoom out (right click) and you can reset the
view with a click to the "lens" button next to the data drop down menu.
The window title shows the current run number that this chart window
corresponds to. Same as for the *Output* window, the chart window is
replaced on each new run, but the behavior can be changed in the

View File

@ -112,9 +112,6 @@ ChartWindow::ChartWindow(const QString &_filename, QWidget *parent) :
order->setToolTip("Smoothing Order");
settings.endGroup();
auto *normal = new QPushButton(QIcon(":/icons/gtk-zoom-fit.png"), "");
normal->setToolTip("Reset zoom to normal");
columns = new QComboBox;
top->addWidget(menu);
top->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum));
@ -161,7 +158,6 @@ ChartWindow::ChartWindow(const QString &_filename, QWidget *parent) :
connect(order, &QAbstractSpinBox::editingFinished, this, &ChartWindow::update_smooth);
connect(window, QOverload<int>::of(&QSpinBox::valueChanged), this, &ChartWindow::update_smooth);
connect(order, QOverload<int>::of(&QSpinBox::valueChanged), this, &ChartWindow::update_smooth);
connect(normal, &QPushButton::released, this, &ChartWindow::reset_zoom);
connect(columns, SIGNAL(currentIndexChanged(int)), this, SLOT(change_chart(int)));
installEventFilter(this);
@ -224,15 +220,6 @@ void ChartWindow::quit()
if (main) main->quit();
}
void ChartWindow::reset_zoom()
{
int choice = columns->currentData().toInt();
if ((choice >= 0) && (choice < charts.size())) {
charts[choice]->update_smooth();
charts[choice]->reset_zoom();
}
}
void ChartWindow::stop_run()
{
auto *main = dynamic_cast<LammpsGui *>(get_main_widget());
@ -462,7 +449,7 @@ ChartViewer::ChartViewer(const QString &title, int _index, QWidget *parent) :
setRenderHint(QPainter::Antialiasing);
setChart(chart);
setRubberBand(QChartView::RectangleRubberBand);
setRubberBand(QChartView::NoRubberBand);
last_update = QTime::currentTime();
update_smooth();
}

View File

@ -49,7 +49,6 @@ public:
private slots:
void quit();
void reset_zoom();
void stop_run();
void select_smooth(int selection);
void update_smooth();