Commit df5ba9b1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Be sure to not create empty group

parent 772fbdf9
......@@ -104,10 +104,10 @@ void SnippetDialog::slotTextChanged()
bool SnippetDialog::snippetIsValid() const
{
if ( mUi->groupWidget->isVisible() )
return ( !mUi->nameEdit->text().isEmpty() &&
!mUi->groupBox->currentText().isEmpty() );
return ( !mUi->nameEdit->text().trimmed().isEmpty() &&
!mUi->groupBox->currentText().trimmed().isEmpty() );
else
return ( !mUi->nameEdit->text().isEmpty() );
return ( !mUi->nameEdit->text().trimmed().isEmpty() );
}
void SnippetDialog::slotReturnPressed()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment