Skip to content

Commit

Permalink
fixed Crash Upon Opening Skills GitHub #78 with long names of skills
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 5c0509d244cc1a5a53ee85b5b1d2dbd4e554d53ef6b1d5b9dc569891242e37cf
  • Loading branch information
thindil committed Oct 1, 2021
1 parent 6e8378d commit d1676a8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ui/ships-ui-crew.adb
Expand Up @@ -700,6 +700,10 @@ package body Ships.UI.Crew is
NewHeight :=
NewHeight + Positive'Value(Winfo_Get(InfoButton, "reqheight"));
Tcl.Tk.Ada.Grid.Grid(ProgressFrame);
Tcl_Eval(Interp, "update");
if Positive'Value(Winfo_Get(ProgressFrame, "reqwidth")) > NewWidth then
NewWidth := Positive'Value(Winfo_Get(ProgressFrame, "reqwidth"));
end if;
ProgressBar :=
Create
(Frame & ".level" &
Expand Down Expand Up @@ -734,7 +738,10 @@ package body Ships.UI.Crew is
NewHeight :=
NewHeight +
Positive'Value(Winfo_Get(ProgressFrame, "reqheight"));
NewWidth := Positive'Value(Winfo_Get(ProgressFrame, "reqwidth"));
Tcl_Eval(Interp, "update");
if Positive'Value(Winfo_Get(ProgressFrame, "reqwidth")) > NewWidth then
NewWidth := Positive'Value(Winfo_Get(ProgressFrame, "reqwidth"));
end if;
end loop Load_Skills_Loop;
if NewHeight > Height then
Height := NewHeight;
Expand Down

0 comments on commit d1676a8

Please sign in to comment.