| 3947 | } |
| 3948 | |
| 3949 | void TextureViewer::ShowGotoPopup() |
| 3950 | { |
| 3951 | TextureDescription *texptr = GetCurrentTexture(); |
| 3952 | |
| 3953 | if(texptr) |
| 3954 | { |
| 3955 | QPoint p = m_PickedPoint; |
| 3956 | |
| 3957 | p.setX(MipCoordFromBase(p.x(), texptr->width)); |
| 3958 | p.setY(MipCoordFromBase(p.y(), texptr->height)); |
| 3959 | |
| 3960 | uint32_t mipHeight = qMax(1U, texptr->height >> (int)m_TexDisplay.subresource.mip); |
| 3961 | |
| 3962 | if(ShouldFlipForGL()) |
| 3963 | p.setY((int)(mipHeight - 1) - p.y()); |
| 3964 | if(m_TexDisplay.flipY) |
| 3965 | p.setY((int)(mipHeight - 1) - p.y()); |
| 3966 | |
| 3967 | m_Goto->show(ui->render, p); |
| 3968 | } |
| 3969 | } |
| 3970 | |
| 3971 | bool TextureViewer::ShouldFlipForGL() |
| 3972 | { |