Navigation Menu

Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcdorman committed Aug 22, 2013
1 parent bbb5716 commit 3c41450
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
2 changes: 0 additions & 2 deletions src/compile_worker.cpp
Expand Up @@ -117,7 +117,5 @@ QString CompileWorker::tempPath()


void CompileWorker::cleanup() void CompileWorker::cleanup()
{ {

// QMessageBox::information(0, "", m_tempDir);
Cleaner c(m_tempDir); Cleaner c(m_tempDir);
} }
1 change: 0 additions & 1 deletion src/main_window.cpp
Expand Up @@ -261,7 +261,6 @@ void MainWindow::updateSettings()


QPalette pal = ui->console->palette(); QPalette pal = ui->console->palette();
pal.setColor(QPalette::Base, consoleColor); pal.setColor(QPalette::Base, consoleColor);
// ui->console->setPalette(pal);


QString contents = ui->console->toPlainText(); QString contents = ui->console->toPlainText();
ui->console->clear(); ui->console->clear();
Expand Down
1 change: 0 additions & 1 deletion src/qhsv_picker.cpp
Expand Up @@ -59,7 +59,6 @@ void QHsvPicker::paintEvent(QPaintEvent *)
QPainter painter(this); QPainter painter(this);


const float widthRatio = width() / 360.0f; const float widthRatio = width() / 360.0f;
//unused: const float heightRatio = height() / 255.0f;


const bool enabled = isEnabled(); const bool enabled = isEnabled();


Expand Down
41 changes: 22 additions & 19 deletions src/vision_dialog.cpp
Expand Up @@ -223,25 +223,28 @@ void VisionDialog::on_down_clicked()


void VisionDialog::updateOptions(const QItemSelection &current, const QItemSelection &prev) void VisionDialog::updateOptions(const QItemSelection &current, const QItemSelection &prev)
{ {
if(prev.indexes().size()) { if(prev.indexes().size()) {
QModelIndex p = prev.indexes()[0]; QModelIndex p = prev.indexes()[0];
Config c = m_configModel->config(); Config c = m_configModel->config();
c.beginGroup(CAMERA_GROUP); c.beginGroup(CAMERA_GROUP);
c.beginGroup(CAMERA_CHANNEL_GROUP_PREFIX + QString::number(p.row()).toStdString()); c.beginGroup(CAMERA_CHANNEL_GROUP_PREFIX + QString::number(p.row()).toStdString());
c.addValues(m_hsvConfig); c.addValues(m_hsvConfig);
m_configModel->setConfig(c); const int row = current.indexes().size() == 1 ? current.indexes()[0].row() : -1;
ui->channels->selectionModel()->select(current, QItemSelectionModel::Select); m_configModel->setConfig(c);
} if(row >= 0) {

ui->channels->selectionModel()->select(m_configModel->index(row, 0), QItemSelectionModel::Select);
const QModelIndexList &indexes = current.indexes(); }
const bool enable = ui->channels->isEnabled(); }
const bool sel = indexes.size() == 1 && enable;
ui->addChannel->setEnabled(enable); const QModelIndexList &indexes = current.indexes();
ui->removeChannel->setEnabled(sel); const bool enable = ui->channels->isEnabled();
ui->up->setEnabled(sel && indexes[0].row() > 0); const bool sel = indexes.size() == 1 && enable;
ui->down->setEnabled(sel && indexes[0].row() + 1 < m_configModel->rowCount()); ui->addChannel->setEnabled(enable);
ui->hsv->setEnabled(sel); ui->removeChannel->setEnabled(sel);

ui->up->setEnabled(sel && indexes[0].row() > 0);
ui->down->setEnabled(sel && indexes[0].row() + 1 < m_configModel->rowCount());
ui->hsv->setEnabled(sel);

if(indexes.size()) { if(indexes.size()) {
Config c = m_configModel->config(); Config c = m_configModel->config();
c.beginGroup(CAMERA_GROUP); c.beginGroup(CAMERA_GROUP);
Expand Down

0 comments on commit 3c41450

Please sign in to comment.