mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
Cleanup to the previous stuff, allow longer ignore value
This commit is contained in:
parent
cb0ef8225c
commit
2fcc2de524
@ -366,10 +366,6 @@ Day *Machine::AddSession(Session *s,Profile *p)
|
||||
|
||||
sessionlist[s->session()]=s; // To make sure it get's saved later even if it's not wanted.
|
||||
|
||||
if (session_length<ignore_sessions) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
QDateTime d1,d2=QDateTime::fromMSecsSinceEpoch(s->first());
|
||||
|
||||
QDate date=d2.date();
|
||||
@ -379,7 +375,7 @@ Day *Machine::AddSession(Session *s,Profile *p)
|
||||
|
||||
|
||||
bool combine_next_day=false;
|
||||
int closest_session=-1;
|
||||
int closest_session=0;
|
||||
|
||||
if (time<split_time) {
|
||||
date=date.addDays(-1);
|
||||
@ -404,6 +400,11 @@ Day *Machine::AddSession(Session *s,Profile *p)
|
||||
}
|
||||
}
|
||||
|
||||
if (session_length<ignore_sessions) {
|
||||
//if (!closest_session || (closest_session>=60))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!firstsession) {
|
||||
if (firstday>date) firstday=date;
|
||||
if (lastday<date) lastday=date;
|
||||
|
@ -15,23 +15,39 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) :
|
||||
QTime t=pref["DaySplitTime"].toTime();
|
||||
ui->timeEdit->setTime(t);
|
||||
}
|
||||
int val;
|
||||
|
||||
if (pref.Exists("CombineCloserSessions")) {
|
||||
int i=pref["CombineCloserSessions"].toInt();
|
||||
ui->combineSlider->setValue(i);
|
||||
if (i>0) {
|
||||
ui->combineLCD->display(i);
|
||||
} else ui->combineLCD->display(tr("OFF"));
|
||||
val=pref["CombineCloserSessions"].toInt();
|
||||
ui->combineSlider->setValue(val);
|
||||
} else {
|
||||
ui->combineSlider->setValue(val=0);
|
||||
pref["CombineCloserSessions"]=val;
|
||||
}
|
||||
if (val>0) {
|
||||
ui->combineLCD->display(val);
|
||||
} else ui->combineLCD->display(tr("OFF"));
|
||||
|
||||
|
||||
if (pref.Exists("IgnoreShorterSessions")) {
|
||||
int i=pref["IgnoreShorterSessions"].toInt();
|
||||
ui->IgnoreSlider->setValue(i);
|
||||
if (i>0) {
|
||||
ui->IgnoreLCD->display(i);
|
||||
} else ui->IgnoreLCD->display(tr("OFF"));
|
||||
val=pref["IgnoreShorterSessions"].toInt();
|
||||
ui->IgnoreSlider->setValue(val);
|
||||
} else {
|
||||
ui->IgnoreSlider->setValue(val=0);
|
||||
pref["IgnoreShorterSessions"]=val;
|
||||
}
|
||||
if (val>0) {
|
||||
ui->IgnoreLCD->display(val);
|
||||
} else ui->IgnoreLCD->display(tr("OFF"));
|
||||
|
||||
|
||||
bool b;
|
||||
if (pref.Exists("MemoryHog")) {
|
||||
ui->memoryHogCheckbox->setChecked(pref["MemoryHog"].toBool());
|
||||
b=pref["MemoryHog"].toBool();
|
||||
} else {
|
||||
pref["MemoryHog"]=b=false;
|
||||
}
|
||||
ui->memoryHogCheckbox->setChecked(b);
|
||||
|
||||
ui->eventTable->setColumnWidth(0,40);
|
||||
ui->eventTable->setColumnWidth(1,55);
|
||||
|
@ -210,7 +210,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-style:italic;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
<number>90</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
|
Loading…
Reference in New Issue
Block a user