From cf0b2688227942f8f41fd8f4bb356e0b26991a8c Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Thu, 23 Nov 2023 10:53:27 -0600 Subject: [PATCH] Fixing geo icon size --- scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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_;