Skip to content

Commit

Permalink
Merge pull request sqlitebrowser#324 from schdub/master
Browse files Browse the repository at this point in the history
plot: remove ssDot item from point shape option
  • Loading branch information
rp- committed May 22, 2015
2 parents 04ee11e + 8a4abcf commit 5761d6b
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 239 deletions.
7 changes: 6 additions & 1 deletion src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,10 @@ void MainWindow::updatePlot(SqliteTableModel *model, bool update)
// some styling
graph->setData(xdata, ydata);
graph->setLineStyle((QCPGraph::LineStyle) ui->comboLineType->currentIndex());
graph->setScatterStyle(QCPScatterStyle((QCPScatterStyle::ScatterShape)ui->comboPointShape->currentIndex(), 5));
// WARN: ssDot is removed
int shapeIdx = ui->comboPointShape->currentIndex();
if (shapeIdx > 0) shapeIdx += 1;
graph->setScatterStyle(QCPScatterStyle((QCPScatterStyle::ScatterShape)shapeIdx, 5));

// gather Y label column names
yAxisLabels << model->headerData(y, Qt::Horizontal).toString();
Expand Down Expand Up @@ -2131,6 +2134,8 @@ void MainWindow::on_comboLineType_currentIndexChanged(int index)

void MainWindow::on_comboPointShape_currentIndexChanged(int index)
{
// WARN: because ssDot point shape is removed
if (index > 0) index += 1;
Q_ASSERT(index >= QCPScatterStyle::ssNone &&
index < QCPScatterStyle::ssPixmap);
QCPScatterStyle::ScatterShape shape = (QCPScatterStyle::ScatterShape) index;
Expand Down
Loading

0 comments on commit 5761d6b

Please sign in to comment.