Ignore:
Timestamp:
08/30/17 22:56:31 (5 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master
Children:
9dbc426
Parents:
30edeb7
Message:

"Open" button is disabled not when no URL was entered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/urlinputdialog.cpp

    r30edeb7 r841aad4  
    2929
    3030    QPushButton* openFile = buttons->addButton("Open File...", QDialogButtonBox::ActionRole);
     31    textChanged(urlEntry->text());
    3132
    3233    connect(openFile, SIGNAL(clicked()), SLOT(openFileClicked()));
    3334    connect(buttons, SIGNAL(accepted()), SLOT(acceptClicked()));
    3435    connect(buttons, SIGNAL(rejected()), SLOT(rejectClicked()));
     36    connect(urlEntry, SIGNAL(textChanged(QString)), SLOT(textChanged(QString)));
    3537}
    3638
     
    4749}
    4850
     51void UrlInputDialog::textChanged(const QString& text)
     52{
     53    buttons->button(QDialogButtonBox::StandardButton::Open)->setEnabled(!text.isEmpty());
     54}
     55
    4956void UrlInputDialog::acceptClicked()
    5057{
Note: See TracChangeset for help on using the changeset viewer.