changed emiting behavior of championChnaged
This commit is contained in:
parent
2045315977
commit
6daa3d5d91
|
@ -48,23 +48,19 @@ void StageSettings::resizeEvent([[maybe_unused]] QResizeEvent* event) {
|
|||
}
|
||||
|
||||
void StageSettings::championChangedinternal(const QString& str) {
|
||||
QString emitting = str;
|
||||
|
||||
if(dd) {
|
||||
int count = 0;
|
||||
const DataDragon::ChampData& cd = dd->getBestMatchingChamp(str.toStdString(), &count);
|
||||
if(cd.key != currentdisplayedChampKey) {
|
||||
img = (cd.key < 0) ? cv::Mat() : dd->getImage(cd.id);
|
||||
currentdisplayedChampKey = cd.key;
|
||||
if(cd.key >= 0) {
|
||||
emitting = QString::fromStdString(cd.name);
|
||||
}
|
||||
rescaleImage();
|
||||
emit championChanged(QString::fromStdString(cd.name));
|
||||
}
|
||||
ui->champcount->setText(tr("Champions matched: %1").arg(QString::fromStdString(std::to_string(count))));
|
||||
rescaleImage();
|
||||
} else {
|
||||
emit championChanged(str);
|
||||
}
|
||||
|
||||
emit championChanged(emitting);
|
||||
}
|
||||
|
||||
void StageSettings::toggledinternal(int state) {
|
||||
|
|
Loading…
Reference in New Issue