Skip to content

Commit

Permalink
Minor its datasource tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
netterfield committed May 2, 2018
1 parent c48cd47 commit bfa7354
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/datasources/its/its.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ int ITSreadimage(ITSfile *its, int frame, int i_img, ITSimage *I) {
return 0;
}

// FIXME: INDEX is wrong! (?)
//index-=3;

// Second: read the header in the data file
offset = lseek(its->fp_data, index, SEEK_SET);
if (offset != index) {
Expand Down
4 changes: 3 additions & 1 deletion src/datasources/its/itsdatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ void ITSSource::reset() {
if (_itsfile) {
ITSclose(_itsfile);
}
_nframes = 0;
_valid = false;
if (init()) {
_valid = true;
Expand All @@ -329,6 +330,7 @@ bool ITSSource::init() {
_itsfile = ITSopen(_filename.toAscii().data());
if (_itsfile->status != ITS_OK) {
ITSclose(_itsfile);
_nframes = 0;
_itsfile = 0;
return false;
}
Expand All @@ -351,7 +353,7 @@ bool ITSSource::init() {
}


// Check if the data in the from the source has updated. Typically done by checking the frame count of the datasource for
// Check if the data in the source has updated. Typically done by checking the frame count of the datasource for
// changes.
Kst::Object::UpdateType ITSSource::internalDataSourceUpdate() {

Expand Down
7 changes: 3 additions & 4 deletions src/libkst/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ Object::UpdateType Object::objectUpdate(qint64 newSerial) {
_serialOfLastChange = newSerial;
_serial = newSerial;
return Updated;
} else {
_serial = newSerial;
return NoChange;
}
// else
_serial = newSerial;
return NoChange;
}

}

// vim: ts=2 sw=2 et

0 comments on commit bfa7354

Please sign in to comment.