Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion addons/script_splitter/core/editor/application/create_tool.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,18 @@ func execute(value : Variant = null) -> bool:

if is_instance_valid(root):
var mt : MickeyTool = _tools[0].build(control)
var is_editor : bool = _is_editor(mt, control)
var doc : bool = false

if mt == null:
for z : int in range(1, _tools.size(), 1):
var x : EditorTool = _tools[z]
mt = x.build(control)

if mt != null:
doc = x is HelperEditorTool
break

var is_editor : bool = _is_editor(mt, control)

if !is_editor:
for z : int in range(1, _tools.size(), 1):
Expand Down
6 changes: 2 additions & 4 deletions addons/script_splitter/core/editor/tools/text_editor_tool.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ extends "./../../../core/editor/tools/editor_tool.gd"
func _build_tool(control : Node) -> MickeyTool:
if control is ScriptEditorBase:
var editor : Control = control.get_base_editor()
var mickey_tool : MickeyTool = null
if editor is CodeEdit:
var parent : Node = control.get_parent()
if parent != null and parent.is_node_ready() and !control.get_parent() is VSplitContainer:
mickey_tool = MickeyTool.new(control, editor, editor)
return MickeyTool.new(control, editor, editor)
else:
mickey_tool = MickeyTool.new(control, editor, editor)
return mickey_tool
return MickeyTool.new(control, editor, editor)
return null