bigluck / alfred2-currencyconverter

A simple Alfred 2 Currency Converter workflow
153 stars 31 forks source link

Default "to" is not taken into account when a non-default "from" currency is used #14

Open durmaze opened 9 years ago

durmaze commented 9 years ago

Hi,

nice workflow!

after setting the default from and to currencies, when i tried to use a different currency for the "from", it didnt use the default "to" currency i set up. instead, it uses the USD.

may be it is by design, but i would expect to use the default "to" currency.

thanks

arvidbjorkstrom commented 8 years ago

In fact, it doesn't explicitly use USD, it uses your default from currency. I'm guessing you have your default to currency set to USD. :)

dixhuit commented 8 years ago

I'm seeing this too. My "default to" is set to GBP but typing "currency AUD" shows me a conversion to USD.

idiotWu commented 8 years ago

I guess the problem is caused from here: e4QueryParser.php#L129.

Changing it into the following will fix this issue:

$this->to = $this->from->isEqualOf($this->defaultTo) ? $this->defaultFrom : $this->defaultTo;
Talzoor commented 7 years ago

It is fixing this issue. great! Thank you idiotWu.

jorgenbs commented 7 years ago

Cheers