mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: implement reset filter
Move initialization to a separate function and connect that to the reset button. Two points of note: 1) Reseting the text-fields causes signals. Thus, signals have to be ignored during reset. Do this with a new flag. 2) To make reset of the from-date work, the from-date has to be initialized to a distinct value. Setting a default-constructed QDateTime leaves the widget unchanged. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
c210bfc0e0
commit
a455b32e02
3 changed files with 41 additions and 16 deletions
|
@ -27,8 +27,8 @@ struct FilterData {
|
|||
double maxWaterTemp = 200;
|
||||
double minAirTemp = -50;
|
||||
double maxAirTemp = 200;
|
||||
QDateTime fromDate;
|
||||
QTime fromTime;
|
||||
QDateTime fromDate = QDateTime(QDate(1980,1,1));
|
||||
QTime fromTime = QTime(0,0);
|
||||
QDateTime toDate = QDateTime::currentDateTime();
|
||||
QTime toTime = QTime::currentTime();
|
||||
QStringList tags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue