1
0
mirror of https://github.com/chylex/Brotli-Builder.git synced 2025-05-11 11:34:03 +02:00

Fix marker panel updating after changing bit stream panel contents in BrotliBuilder

This commit is contained in:
chylex 2020-02-14 14:16:40 +01:00
parent 0465f26239
commit e80fb54eea
3 changed files with 14 additions and 3 deletions

View File

@ -79,7 +79,6 @@ namespace BrotliBuilder.Components{
private void UpdateTextBox(FastColoredTextBox tb, string text, Color color){
tb.ForeColor = color;
tb.Text = text;
tb.Navigate(0);
}
private void UpdateTextBox(FastColoredTextBox tb, string text){

View File

@ -32,6 +32,17 @@ namespace BrotliBuilder.Components{
}
}
public override string Text{
get{
return base.Text;
}
set{
updatingText = true;
base.Text = value;
updatingText = false;
}
}
public string? MarkerTitle { get; set; }
public MarkerRoot? MarkerRoot { get; private set; }
@ -44,6 +55,7 @@ namespace BrotliBuilder.Components{
private MarkerNode[]? prevMarkerSequence = null;
private MarkerNode? markerCaret = null;
private bool updatingText = false;
private bool updatingMarkers = false;
private bool mouseSelecting = false;
@ -144,7 +156,7 @@ namespace BrotliBuilder.Components{
}
private void MarkedFastTextBox_SelectionChanged(object? sender, EventArgs e){
if (!updatingMarkers && !mouseSelecting && !ModifierKeys.HasFlag(Keys.Shift)){
if (!updatingText && !updatingMarkers && !mouseSelecting && !ModifierKeys.HasFlag(Keys.Shift)){
RefreshMarkers();
}
}

View File

@ -92,7 +92,7 @@ namespace BrotliBuilder{
}
private void CloseOriginal(){
fileOriginal.ResetToNothing(); // TODO for some reason changes marker source
fileOriginal.ResetToNothing();
}
}
}