File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -105,15 +105,33 @@ void Column::dbLoadOldIndex(int index)
105105
106106 db ().transactionReadBegin ();
107107
108- dbLoadIndex (_id, false );
108+ dbLoad (_id, false );
109109
110110 db ().columnGetValues (_id, _ints, " INT" );
111111 db ().columnGetValues (_id, _dbls, _strs, " DBL" );
112112
113- db ().labelsLoad (this );
113+ if (std::none_of (_ints.begin (), _ints.end (), [](int i){ return i != Label::NO_LABEL && i != 0 && i != EmptyValues::missingValueInteger; }))
114+ {
115+ _hasLabels = false ;
116+ _ints.clear ();
117+ labelsClear ();
118+ db ().labelsClear (_id);
119+ }
120+ else
121+ {
122+ _hasLabels = true ;
123+
124+ db ().labelsLoad (this );
125+ _resetLabelValueMap ();
126+
127+ for (int row=0 ; row<_ints.size () && row < _dbls.size (); row++)
128+ {
129+ // if(_ints[row] ==
130+ Label * l = labelByIntsId (_ints[row]);
131+ Log::log () << " _ints[" << row << " ] == " << _ints[row] << " and _dbls[" << row << " ] == " << _dbls[row] << " label is: '" << ( !l ? " null" : l->labelDisplay ()) << " '" << std::endl;
132+ }
133+ }
114134
115- _resetLabelValueMap ();
116-
117135 db ().transactionReadEnd ();
118136}
119137
You can’t perform that action at this time.
0 commit comments