Changeset - 2c1e89113ca8
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 8 years ago 2017-08-30 06:23:31
hy@ozderya.net
don't allow xmin >= xmax

it breaks the plot because of newly implemented setrectofinterest
1 file changed with 16 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/plotcontrolpanel.cpp
Show inline comments
 
@@ -86,9 +86,25 @@ PlotControlPanel::PlotControlPanel(QWidg
 
    connect(ui->spXmax, SIGNAL(valueChanged(double)),
 
            this, SLOT(onXScaleChanged()));
 

	
 
    connect(ui->spXmax, static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
 
            [this](double v)
 
            {
 
                // set limit just a little below
 
                double step = pow(10, -1 * ui->spXmin->decimals());
 
                ui->spXmin->setMaximum(v - step);
 
            });
 

	
 
    connect(ui->spXmin, SIGNAL(valueChanged(double)),
 
            this, SLOT(onXScaleChanged()));
 

	
 
    connect(ui->spXmin, static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
 
            [this](double v)
 
            {
 
                // set limit just a little above
 
                double step = pow(10, -1 * ui->spXmax->decimals());
 
                ui->spXmax->setMinimum(v + step);
 
            });
 

	
 
    connect(ui->spPlotWidth, SIGNAL(valueChanged(int)),
 
            this, SLOT(onPlotWidthChanged()));
 

	
0 comments (0 inline, 0 general)