GUI: data dialog: convert Line Feeds if escaping on input, escape on output

and set Escaped flag; fix tooltip that they're converted to spaces;
  sequence dialog: re-organize to put Create Sequence stuff only in groupbox
  and put Import -> From File and Clear at bottom, similar to data dialog;
  mainwindow: use new Escaped flag from data dialog and set checkbox and
  statusbar message accordingly
This commit is contained in:
gitlost 2021-11-25 20:24:02 +00:00
parent c0e1af9859
commit f943893d6d
11 changed files with 270 additions and 220 deletions

View file

@ -478,13 +478,18 @@ void MainWindow::help()
void MainWindow::open_data_dialog()
{
DataWindow dlg(txtData->text());
DataWindow dlg(txtData->text(), chkEscape->isChecked());
(void) dlg.exec();
if (dlg.Valid) {
const bool updated = txtData->text() != dlg.DataOutput;
txtData->setText(dlg.DataOutput);
if (updated) {
statusBar->showMessage(tr("Updated data"), tempMessageTimeout);
if (dlg.Escaped && !chkEscape->isChecked()) {
chkEscape->setChecked(true);
statusBar->showMessage(tr("Set \"Parse Escapes\", updated data"), tempMessageTimeout);
} else {
statusBar->showMessage(tr("Updated data"), tempMessageTimeout);
}
}
}
}