Strange menuitem "diffractogram -> To add a baseline fit range, mark it in the diffractogram ..."

The menu item diffractogram -> To add a baseline fit range, mark it in the diffractogram ... is ridiculous for at least two points

  • the text of this menu item is far too long
  • all it does is to open up a messagebox with documentation how to use this function
  • uses the same short cut sequence as for File -> Add files

I suggest removing this menu item and implementing helpful tool tips and update the online documentation.

image Screenshot_at_2023-02-27_17-52-40

AddRangeBox::AddRangeBox(const QString& genre) : QDialog{gGui, Qt::Dialog}
{
    auto* vb = new QVBoxLayout;
    auto* hb = new QHBoxLayout;
    auto* info = new QLabel;
    auto* dbbox = new QDialogButtonBox{QDialogButtonBox::Ok};

    setWindowTitle("How to add a fit range");

    // vertical layout
    setLayout(vb);
    vb->setSpacing(12);
    vb->setSizeConstraint(QLayout::SetFixedSize);

    vb->addLayout(hb);
    hb->setSpacing(12);

    info->setText(QString("<p>To add a %1 fit range, mark it in the diffractogram:<br>"
                          "Move the cursor over the selected range while keeping the left mouse "
                          "button pressed.</p>")
                      .arg(genre));
    info->setAlignment(Qt::AlignTop | Qt::AlignLeft);
    info->setOpenExternalLinks(true);
#ifdef Q_OS_MAC
    // a smaller font (a hint found in Qt source code)
    info->setFont(QToolTip::font());
#endif
    hb->addWidget(info);

    vb->addWidget(dbbox);

    connect(dbbox, &QDialogButtonBox::accepted, this, &QDialog::accept);
}
Edited by Trageser