MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / switch_to_tool

Method switch_to_tool

src/DrawingProgram/DrawingProgram.cpp:619–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619void DrawingProgram::switch_to_tool(DrawingProgramToolType newToolType, bool force) {
620 if(newToolType != drawTool->get_type() || force) {
621 drawTool->switch_tool(newToolType);
622 drawTool = DrawingProgramToolBase::allocate_tool_type(*this, newToolType);
623 clear_right_click_popup();
624 world.main.g.gui.set_to_layout();
625 }
626}
627
628bool DrawingProgram::prevent_undo_or_redo() {
629 return drawTool->prevent_undo_or_redo();

Callers 5

top_toolbarMethod · 0.80
bottom_toolbar_guiMethod · 0.80
paste_clipboardMethod · 0.80

Calls 3

set_to_layoutMethod · 0.80
get_typeMethod · 0.45
switch_toolMethod · 0.45

Tested by

no test coverage detected