Editor: Hide grade circle in viewport when using rectangle or picker tool

console-destruction
Sven Eberhardt 2016-08-27 20:10:58 -04:00
parent 4f74d88d51
commit 528504d72e
2 changed files with 2 additions and 1 deletions

View File

@ -877,7 +877,7 @@ void C4EditCursor::Draw(C4TargetFacet &cgo)
DropTarget->GetX() + cgo.X - cgo.TargetX - ::GraphicsResource.fctDropTarget.Wdt / 2,
DropTarget->GetY() + DropTarget->Shape.y + cgo.Y - cgo.TargetY - ::GraphicsResource.fctDropTarget.Hgt);
// Draw paint circle
if (Mode == C4CNS_ModeDraw && has_mouse_hover && ::Console.ToolsDlg.Grade>0)
if (Mode == C4CNS_ModeDraw && has_mouse_hover && ::Console.ToolsDlg.Grade>0 && ::Console.ToolsDlg.IsGradedTool())
{
// shadow for recognition on white background/material
pDraw->DrawCircleDw(cgo.Surface, X + cgo.X - cgo.TargetX + 1.0f/cgo.Zoom, Y + cgo.Y - cgo.TargetY + 1.0f / cgo.Zoom, ::Console.ToolsDlg.Grade, 0xff000000, line_width);

View File

@ -78,6 +78,7 @@ public:
bool SelectBackMaterial(const char *szMaterial, bool by_console_gui = false);
void SetAlternateTool();
void ResetAlternateTool();
bool IsGradedTool() const { return Tool == C4TLS_Brush || Tool == C4TLS_Line || Tool == C4TLS_Fill; } // return whether Grade measure affects selected tool
protected:
void AssertValidTexture();
void AssertValidBackTexture();