diff --git a/include/date.h b/include/date.h index 314860bd7..3b41adfb8 100755 --- a/include/date.h +++ b/include/date.h @@ -295,6 +295,6 @@ const TDate& fnc_max(const TDate& a, const TDate& b); const char* itom(int month); const char* itow(int dayofweek); -const TDate botime(0,0,0), eotime(31,12,2050); +const TDate botime(0,0,0), eotime(31,12,3000); #endif // __DATE_H diff --git a/include/relapp.cpp b/include/relapp.cpp index b6292939d..0875ac383 100755 --- a/include/relapp.cpp +++ b/include/relapp.cpp @@ -22,6 +22,18 @@ TRelation_application::TRelation_application() TRelation_application::~TRelation_application() { } +bool TRelation_application::has_filtered_cursor() const +{ + bool yes = filtered(); + if (yes) + { + const TEdit_field& f = get_search_field(); + yes = f.browse() != NULL; + } + return yes; +} + + TCursor& TRelation_application::get_filtered_cursor() const { const TEdit_field& f = get_search_field(); @@ -278,7 +290,7 @@ void TRelation_application::set_toolbar() pos = _mask->id2pos(DLG_DELREC); if (pos >= 0) { - bool enabdel = ((mode == MODE_QUERY && can_edit_some) || (mode == MODE_MOD)) && can_nav; + bool enabdel = ((mode == MODE_QUERY && can_edit_some) || (mode == MODE_MOD))/* && can_nav*/; // Voglio poter cancellare cg2 da cg3 if (enabdel && mode == MODE_MOD) { TRelation& r = *get_relation(); diff --git a/include/relapp.h b/include/relapp.h index 985c95846..5a792f4ae 100755 --- a/include/relapp.h +++ b/include/relapp.h @@ -105,8 +105,7 @@ private: // @cmember:(INTERNAL) Permette di autonumerare un record bool autonum(TMask* m, bool rec); // @cmember:(INTERNAL) Controlla se il ha un filtro - virtual bool has_filtered_cursor() const - { return filtered(); } + virtual bool has_filtered_cursor() const; virtual TCursor& get_filtered_cursor() const; // @cmember:(INTERNAL) Sistema il bottone ricerca se necessario