mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 11:40:42 +00:00
merged with master
This commit is contained in:
parent
ded6c60b3b
commit
76722c5e41
@ -24,6 +24,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// Features enabled by conditional compilation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <QCalendarWidget>
|
#include <QCalendarWidget>
|
||||||
#include <QTextCharFormat>
|
#include <QTextCharFormat>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@ -591,6 +596,9 @@ void Overview::on_XBoundsChanged(qint64 start,qint64 end)
|
|||||||
chartsEmpty.clear();
|
chartsEmpty.clear();
|
||||||
updateGraphCombo();
|
updateGraphCombo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Overview::dateStart_currentPageChanged(int year, int month)
|
void Overview::dateStart_currentPageChanged(int year, int month)
|
||||||
@ -643,7 +651,7 @@ void Overview::on_dateStart_dateChanged(const QDate &date)
|
|||||||
void Overview::on_zoomButton_clicked()
|
void Overview::on_zoomButton_clicked()
|
||||||
{
|
{
|
||||||
// the Current behaviour is to zoom back to the last range created by on_rangeCombo_activation
|
// the Current behaviour is to zoom back to the last range created by on_rangeCombo_activation
|
||||||
// so do just that
|
// This change preserves OSCAR behaviour
|
||||||
on_rangeCombo_activated(p_profile->general->lastOverviewRange()); // type of range in last use
|
on_rangeCombo_activated(p_profile->general->lastOverviewRange()); // type of range in last use
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -703,13 +711,6 @@ void Overview::on_rangeCombo_activated(int index)
|
|||||||
p_profile->general->setCustomOverviewRangeEnd(end);
|
p_profile->general->setCustomOverviewRangeEnd(end);
|
||||||
index=8;
|
index=8;
|
||||||
ui->rangeCombo->setCurrentIndex(index);
|
ui->rangeCombo->setCurrentIndex(index);
|
||||||
} else if (customMode) { // last mode was custom.
|
|
||||||
// Reset Custom Range to current range in calendar widget
|
|
||||||
// Custom mode MUST be initialized to false when the Custom Instance is created.
|
|
||||||
start = uiStartDate;
|
|
||||||
end = uiEndDate;
|
|
||||||
p_profile->general->setCustomOverviewRangeStart(start);
|
|
||||||
p_profile->general->setCustomOverviewRangeEnd(end);
|
|
||||||
} else {
|
} else {
|
||||||
// have a change in RangeCombo selection. Use last saved values.
|
// have a change in RangeCombo selection. Use last saved values.
|
||||||
start = p_profile->general->customOverviewRangeStart() ;
|
start = p_profile->general->customOverviewRangeStart() ;
|
||||||
@ -720,12 +721,15 @@ void Overview::on_rangeCombo_activated(int index)
|
|||||||
if (start < p_profile->FirstDay()) { start = p_profile->FirstDay(); }
|
if (start < p_profile->FirstDay()) { start = p_profile->FirstDay(); }
|
||||||
|
|
||||||
customMode = (index == 8) ;
|
customMode = (index == 8) ;
|
||||||
|
|
||||||
|
|
||||||
ui->dateStartLabel->setEnabled(customMode);
|
ui->dateStartLabel->setEnabled(customMode);
|
||||||
ui->dateEndLabel->setEnabled(customMode);
|
ui->dateEndLabel->setEnabled(customMode);
|
||||||
ui->dateEnd->setEnabled(customMode);
|
ui->dateEnd->setEnabled(customMode);
|
||||||
ui->dateStart->setEnabled(customMode);
|
ui->dateStart->setEnabled(customMode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
p_profile->general->setLastOverviewRange(index); // type of range in last use
|
p_profile->general->setLastOverviewRange(index); // type of range in last use
|
||||||
|
|
||||||
// Ensure that all summary files are available and update version numbers if required
|
// Ensure that all summary files are available and update version numbers if required
|
||||||
@ -749,9 +753,6 @@ void Overview::on_rangeCombo_activated(int index)
|
|||||||
progress->close();
|
progress->close();
|
||||||
delete progress;
|
delete progress;
|
||||||
|
|
||||||
// first and last dates for ANY machine type
|
|
||||||
//uiStartDate=start;
|
|
||||||
//uiEndDate=end;
|
|
||||||
setRange(start, end);
|
setRange(start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user