solid-inspector icon indicating copy to clipboard operation
solid-inspector copied to clipboard

ESC misbehaviour

Open thomthom opened this issue 5 years ago • 1 comments

https://forums.sketchup.com/t/solid-inspector/5117/218?u=thomthom

https://forums.sketchup.com/t/solid-inspector/5117/222?u=thomthom

https://forums.sketchup.com/t/solid-inspector/5117/224?u=thomthom

thomthom avatar Nov 24 '20 13:11 thomthom

Thomas,

Paul McAlenan here - https://forums.sketchup.com/t/solid-inspector/5117/218

I noticed that using the ESC key to exit Inspector works only if there are "errors".

In inspector_tool.rb there is the following method:

def onKeyUp(key, repeat, flags, view)
      return if @errors.empty?

and then at the end before view.invalidate there is:

if key == KEY_ESCAPE
	deselect_tool
	#return true
end 

So if @errors is empty the method returns which means that the Esc key is never detected - I don't know if this is intended behaviour.

If I move if key == KEY_ESCAPE... ...end to before return if @errors.empty? I can exit Inspector when there are no "errors".

Not sure if this would have any unintended consequences.

orbitaleccentric avatar Jun 01 '22 13:06 orbitaleccentric