WIP: Fixing silly display cases

This commit is contained in:
2026-05-06 18:31:01 +09:00
parent 41bd9eeacd
commit b4dbf21c41
3 changed files with 81 additions and 26 deletions
+11 -3
View File
@@ -733,15 +733,23 @@ load_from_tx(State, Address) ->
handle_troubling(State, Error)
end.
load2(State, Address) ->
load2(State = #s{cons = {_, Pages}}, Address) when is_binary(Address) ->
case lists:keyfind(Address, #c.id, Pages) of
false -> load3(State, Address);
#c{} -> State
end;
load2(State, Address) when is_list(Address) ->
load2(State, list_to_binary(Address)).
load3(State, Address) ->
case hz:contract_source(Address) of
{ok, Source} ->
load3(State, Address, Source);
load4(State, Address, Source);
Error ->
handle_troubling(State, Error)
end.
load3(State = #s{tabs = TopBook, cons = {Consbook, Pages}, buttons = Buttons, j = J},
load4(State = #s{tabs = TopBook, cons = {Consbook, Pages}, buttons = Buttons, j = J},
Address,
Source) ->
Window = wxWindow:new(Consbook, ?wxID_ANY),