Skip to content

Commit

Permalink
Merge branch 'release/9.1' into feature/basedOnStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
aror92 authored Apr 29, 2024
2 parents 2514893 + c9f0c9c commit dc7ee72
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
12 changes: 10 additions & 2 deletions Src/LexText/Interlinear/InterlinDocForAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public virtual void TriggerAnalysisSelected(AnalysisOccurrence target, bool fSav
MoveFocusBoxIntoPlace();
// Now it is the right size and place we can show it.
TryShowFocusBox();
// All this CAN hapen because we're editing in another window...for example,
// All this CAN happen because we're editing in another window...for example,
// if we edit something that deletes the current wordform in a concordance view.
// In that case we don't want to steal the focus.
if (ParentForm == Form.ActiveForm)
Expand Down Expand Up @@ -1828,16 +1828,19 @@ internal override void UpdateForNewLineChoices(InterlinLineChoices newChoices)
}
}

private bool previousRightToLeft;
private bool hasRightToLeftChanged => previousRightToLeft != Vc.RightToLeft;
/// <summary>
/// returns the focus box for the interlinDoc if it exists or can be created.
/// </summary>
internal FocusBoxController FocusBox
{
get
{
if (ExistingFocusBox == null && ForEditing)
if ((ExistingFocusBox == null && ForEditing) || hasRightToLeftChanged)
{
CreateFocusBox();
previousRightToLeft = Vc.RightToLeft;
}
return ExistingFocusBox;
}
Expand All @@ -1849,6 +1852,11 @@ internal FocusBoxController FocusBox

internal override void CreateFocusBox()
{
if (ExistingFocusBox != null)
{
ExistingFocusBox.Dispose();
}

ExistingFocusBox = CreateFocusBoxInternal();
}

Expand Down
4 changes: 2 additions & 2 deletions Src/LexText/Interlinear/SandboxBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3873,10 +3873,10 @@ public override void MakeRoot()

m_dxdLayoutWidth = kForceLayout; // Don't try to draw until we get OnSize and do layout.
// For some reason, we don't always initialize our control size to be the same as our rootbox.
this.Margin = new Padding(3, 0, 3, 1);
Margin = new Padding(3, 0, 3, 1);
SyncControlSizeToRootBoxSize();
if (RightToLeftWritingSystem)
this.Anchor = AnchorStyles.Right | AnchorStyles.Top;
Anchor = AnchorStyles.Right | AnchorStyles.Top;

//TODO:
//ptmw->RegisterRootBox(qrootb);
Expand Down
2 changes: 2 additions & 0 deletions Src/xWorks/UploadToWebonaryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ private bool RecursivelyPutFilesToWebonary(UploadToWebonaryModel model, string d
var signedUrl = PostContentToWebonary(model, webonaryView, "post/file", fileToSign);
if (string.IsNullOrEmpty(signedUrl))
{
webonaryView.SetStatusCondition(WebonaryStatusCondition.None);
webonaryView.UpdateStatus(xWorksStrings.UploadToWebonaryController_RetryAfterFailedConnection);
// Sleep briefly and try one more time (To compensate for a potential lambda cold start)
Thread.Sleep(500);
signedUrl = PostContentToWebonary(model, webonaryView, "post/file", fileToSign);
Expand Down
11 changes: 10 additions & 1 deletion Src/xWorks/xWorksStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Src/xWorks/xWorksStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1259,4 +1259,7 @@ See USFM documentation for help.</value>
<data name="Webonary_UnexpectedUploadError" xml:space="preserve">
<value>Unexpected error encountered while uploading to webonary.</value>
</data>
<data name="UploadToWebonaryController_RetryAfterFailedConnection" xml:space="preserve">
<value>Initial connection failed retrying...</value>
</data>
</root>

0 comments on commit dc7ee72

Please sign in to comment.