mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: change the weather location widget index only if the pre-location index is found
when a source is set is not added as item to the location widget (see WeatherConfig::setSource()) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8558ee30fe
commit
9eb152aae6
1 changed files with 3 additions and 1 deletions
|
@ -203,7 +203,9 @@ void WeatherConfig::Private::locationFinished()
|
|||
{
|
||||
if (!preLocationText.isEmpty()) {
|
||||
const int preLocationIndex = ui.locationCombo->findText(preLocationText);
|
||||
ui.locationCombo->setCurrentIndex(preLocationIndex);
|
||||
if (preLocationIndex >= 0) {
|
||||
ui.locationCombo->setCurrentIndex(preLocationIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue