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:
parent
0465f26239
commit
e80fb54eea
BrotliBuilder
@ -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){
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ namespace BrotliBuilder{
|
||||
}
|
||||
|
||||
private void CloseOriginal(){
|
||||
fileOriginal.ResetToNothing(); // TODO for some reason changes marker source
|
||||
fileOriginal.ResetToNothing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user