Skip to content

Commit

Permalink
#5128: Highlight the selected circle
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Sep 12, 2021
1 parent 3836a9e commit de4fc12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions radiant/textool/TexTool.cpp
Expand Up @@ -316,7 +316,8 @@ const VolumeTest& TexTool::getVolumeTest() const

void TexTool::forceRedraw()
{
draw();
_glWidget->Refresh();
_glWidget->Update();
}

void TexTool::draw()
Expand Down Expand Up @@ -1189,7 +1190,6 @@ void TexTool::handleGLCapturedMouseMotion(const MouseToolPtr& tool, int x, int y

#if 0
bool mouseToolReceivesDeltas = (tool->getPointerMode() & MouseTool::PointerMode::MotionDeltas) != 0;
#endif
bool pointerFrozen = (tool->getPointerMode() & MouseTool::PointerMode::Freeze) != 0;

// Check if the mouse has reached exceeded the window borders for chase mouse behaviour
Expand All @@ -1199,6 +1199,7 @@ void TexTool::handleGLCapturedMouseMotion(const MouseToolPtr& tool, int x, int y
// Chase mouse activated, an idle callback will kick in soon
return;
}
#endif

// Send mouse move events to the active tool and all inactive tools that want them
MouseToolHandler::onGLCapturedMouseMove(x, y, mouseState);
Expand Down Expand Up @@ -1358,7 +1359,7 @@ void TexTool::onManipulationChanged()

void TexTool::onManipulationEnd()
{

_activeManipulator->setSelected(false);
}

void TexTool::onManipulationCancelled()
Expand Down
2 changes: 1 addition & 1 deletion radiant/textool/tools/TextureToolManipulateMouseTool.cpp
Expand Up @@ -90,7 +90,7 @@ unsigned int TextureToolManipulateMouseTool::getPointerMode()

unsigned int TextureToolManipulateMouseTool::getRefreshMode()
{
return RefreshMode::Force | RefreshMode::AllViews; // update cam view too
return RefreshMode::Force | RefreshMode::ActiveView;
}

bool TextureToolManipulateMouseTool::selectManipulator(const render::View& view, const Vector2& devicePoint, const Vector2& deviceEpsilon)
Expand Down
Expand Up @@ -101,6 +101,8 @@ void TextureToolRotateManipulator::renderComponents(const Matrix4& pivot2World)

const auto& translation = pivot2World.tCol().getVector3();

_renderableCircle.setColour(Colour4b(255, isSelected() ? 255 : 0, 0, 255));

glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glTranslated(translation.x(), translation.y(), 0);
Expand Down

0 comments on commit de4fc12

Please sign in to comment.