diff --git a/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp b/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp index 5615d3f3..712bdc44 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp @@ -350,23 +350,20 @@ void IconInfo::UpdateTextureInfo() { columns_ = texture_.size_.x / iconWidth_; rows_ = texture_.size_.y / iconHeight_; - - if (hotX_ == -1 || hotY_ == -1) - { - hotX_ = static_cast(iconWidth_ / 2); - hotY_ = static_cast(iconHeight_ / 2); - } } else { columns_ = 1u; rows_ = 1u; - if (hotX_ == -1 || hotY_ == -1) - { - hotX_ = static_cast(texture_.size_.x / 2); - hotY_ = static_cast(texture_.size_.y / 2); - } + iconWidth_ = static_cast(texture_.size_.x); + iconHeight_ = static_cast(texture_.size_.y); + } + + if (hotX_ == -1 || hotY_ == -1) + { + hotX_ = static_cast(iconWidth_ / 2); + hotY_ = static_cast(iconHeight_ / 2); } numIcons_ = columns_ * rows_;