Skip to content

Commit f1caf98

Browse files
committed
f/sawhite - performance - Updated plot pruning and icons. We no longer wrap the plots in the plot area to avoid a bug where flipping from 0-1 would get plots out of sync
1 parent 629a661 commit f1caf98

File tree

8 files changed

+544
-433
lines changed

8 files changed

+544
-433
lines changed

projects/ui/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ set_target_properties(${PROJECT_NAME}
6060
PROJECT_LABEL "${PROJECT_NAME}"
6161
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}
6262
AUTOMOC ON
63-
CXX_STANDARD 14
63+
CXX_STANDARD 14
6464
VS_DEBUGGER_WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/runtime
6565
CPACK_START_MENU_SHORTCUTS "Biogears UI"
6666
)

projects/ui/qml/GraphArea.qml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,11 @@ GraphAreaForm {
415415
default:
416416
continue;
417417
}
418+
let visible = (i == plots.currentIndex)
418419
for ( var j = 0; j < currentModel.count; ++j){
419420
var plot = currentModel.get(j)
420421
if (plot.model && plot.rate == 10){
421-
plot.update(physiologyRequestModel.simulation_time)
422+
plot.update(physiologyRequestModel.simulation_time, visible)
422423
}
423424
}
424425
}
@@ -464,10 +465,11 @@ GraphAreaForm {
464465
default:
465466
continue;
466467
}
468+
let visible = (i == plots.currentIndex)
467469
for ( var j = 0; j < currentModel.count; ++j){
468470
var plot = currentModel.get(j)
469471
if (plot.model && plot.rate == 5){
470-
plot.update(physiologyRequestModel.simulation_time)
472+
plot.update(physiologyRequestModel.simulation_time, visible)
471473
}
472474
}
473475
}
@@ -513,16 +515,17 @@ GraphAreaForm {
513515
default:
514516
continue;
515517
}
518+
let visible = (i == plots.currentIndex)
516519
for ( var j = 0; j < currentModel.count; ++j){
517520
var plot = currentModel.get(j)
518521
if (plot.model && plot.rate == 1){
519-
plot.update(physiologyRequestModel.simulation_time)
522+
plot.update(physiologyRequestModel.simulation_time, visible)
520523
}
521524
}
522525
}
523526
}
524527

525-
everyFiveSecondsPlotTimer.onTriggered : {
528+
everyFiveSecondsPlotTimer.onTriggered : {
526529
let currentCategory = null
527530
let currentModel = null
528531
for (var i = 0 ; i < PhysiologyModel.TOTAL_CATEGORIES; ++i){
@@ -562,11 +565,12 @@ GraphAreaForm {
562565
default:
563566
continue;
564567
}
568+
let visible = (i == plots.currentIndex)
565569
for ( var j = 0; j < currentModel.count; ++j){
566570
var plot = currentModel.get(j)
567571
if (plot.model && plot.rate == -5){
568572

569-
plot.update(physiologyRequestModel.simulation_time)
573+
plot.update(physiologyRequestModel.simulation_time, visible)
570574
}
571575
}
572576
}
@@ -612,10 +616,11 @@ GraphAreaForm {
612616
default:
613617
continue;
614618
}
619+
let visible = (i == plots.currentIndex)
615620
for ( var j = 0; j < currentModel.count; ++j){
616621
var plot = currentModel.get(j)
617622
if (plot.model && plot.rate == -10){
618-
plot.update(physiologyRequestModel.simulation_time)
623+
plot.update(physiologyRequestModel.simulation_time, visible)
619624
}
620625
}
621626
}

0 commit comments

Comments
 (0)