Skip to content

Commit

Permalink
Put 'Send File' command in serial edit input
Browse files Browse the repository at this point in the history
  • Loading branch information
Koromix committed Dec 2, 2019
1 parent c874426 commit e95d98f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/tycommander/main_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ MainWindow::MainWindow(QWidget *parent)
// Serial menu
connect(actionEnableSerial, &QAction::triggered, this,
&MainWindow::setEnableSerialForSelection);
connect(actionSendFile, &QAction::triggered, this, &MainWindow::sendFileToSelection);
connect(actionSendFile, &QAction::triggered, this, &MainWindow::makeSendFileCommand);
connect(actionClearSerial, &QAction::triggered, this, &MainWindow::clearSerialDocument);

// View menu
Expand Down Expand Up @@ -610,7 +610,7 @@ void MainWindow::openAboutDialog()
about_dialog_->show();
}

void MainWindow::sendFileToSelection()
void MainWindow::makeSendFileCommand()
{
if (selected_boards_.empty())
return;
Expand All @@ -619,8 +619,8 @@ void MainWindow::sendFileToSelection()
if (filename.isEmpty())
return;

auto serial_str = QString("@send_file %1").arg(filename);
sendToSelectedBoards(serial_str);
auto cmd = QString("@send_file %1").arg(filename);
serialEdit->setCurrentText(cmd);
}

void MainWindow::clearSerialDocument()
Expand Down
2 changes: 1 addition & 1 deletion src/tycommander/main_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public slots:
void openPreferences();
void openAboutDialog();

void sendFileToSelection();
void makeSendFileCommand();
void clearSerialDocument();

private:
Expand Down

0 comments on commit e95d98f

Please sign in to comment.