Skip to content

Commit 22b28b0

Browse files
committed
Fix no draw if only trimmable source
1 parent 2adb538 commit 22b28b0

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

uis/src/com/biglybt/ui/swt/components/graphics/MultiPlotGraphic.java

+13-3
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,9 @@ public void handleEvent(Event e) {
724724
Set<ValueSource> bold_sources = new HashSet<>();
725725
Set<ValueSource> dotted_sources = new HashSet<>();
726726

727-
int max = 0;
728-
727+
int max = 0;
728+
int trim_max = 0;
729+
729730
for ( int i=0;i<maxs.length;i++){
730731

731732
ValueSource source = value_sources[i];
@@ -745,12 +746,21 @@ public void handleEvent(Event e) {
745746
dotted_sources.add( source );
746747
}
747748

748-
if ( !source.isTrimmable()){
749+
if ( source.isTrimmable()){
749750

751+
trim_max = Math.max( trim_max, maxs[i] );
752+
753+
}else{
754+
750755
max = Math.max( max, maxs[i] );
751756
}
752757
}
753758

759+
if ( max == 0 ){
760+
761+
max = trim_max;
762+
}
763+
754764
int max_primary = max;
755765

756766
for ( int i=0;i<maxs.length;i++){

0 commit comments

Comments
 (0)