Commit 45e6edaf authored by Petar Perisin's avatar Petar Perisin
Browse files

Git - fix bug with empty working directory in ChangeSelectionDialog



and also remove unnedded command.

Change-Id: I6c20f2061fc3628693d80ad01fe23c1a835ca127
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent 808afcfb
......@@ -157,7 +157,7 @@ void ChangeSelectionDialog::chooseWorkingDirectory()
QString ChangeSelectionDialog::workingDirectory() const
{
if (!QDir(m_workingDirEdit->text()).exists())
if (m_workingDirEdit->text().isEmpty() || !QDir(m_workingDirEdit->text()).exists())
return QString();
return GitPlugin::instance()->gitClient()->
......@@ -230,7 +230,6 @@ void ChangeSelectionDialog::recalculateDetails()
QString workingDir = workingDirectory();
QPalette palette = m_workingDirEdit->palette();
if (workingDir.isEmpty()) {
m_workingDirEdit->palette();
m_detailsText->setPlainText(tr("Error: Bad working directory."));
palette.setColor(QPalette::Text, Qt::red);
m_workingDirEdit->setPalette(palette);
......
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