From Antoine Hue,
"There was a typo in "int setNotifyOffset()", appear to be a getter => "int getNotifyOffset()". Then I have added a switch to create GDALTermProgress only when the current notify level + local offset permit message display. In fact, if the offset is set to 0 and the notify level is at the default, DataSet is quiet but for the GDALTermProgress. That is quite disturbing since you think the progress is related to the complete processing but it is actually only related to the GDAL Warp."
This commit is contained in:
@@ -1161,7 +1161,7 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
|
||||
|
||||
|
||||
static void setNotifyOffset(int level);
|
||||
static int setNotifyOffset();
|
||||
static int getNotifyOffset();
|
||||
|
||||
|
||||
CompositeDestination* createDestinationGraph(CompositeDestination* parent,
|
||||
|
||||
@@ -53,7 +53,7 @@ using namespace osgTerrain;
|
||||
|
||||
static int s_notifyOffset = 0;
|
||||
void DataSet::setNotifyOffset(int level) { s_notifyOffset = level; }
|
||||
int DataSet::setNotifyOffset() { return s_notifyOffset; }
|
||||
int DataSet::getNotifyOffset() { return s_notifyOffset; }
|
||||
|
||||
inline std::ostream& my_notify(osg::NotifySeverity level) { return osg::notify(osg::NotifySeverity(s_notifyOffset+level)); }
|
||||
|
||||
@@ -1269,8 +1269,11 @@ DataSet::Source* DataSet::Source::doReproject(const std::string& filename, osg::
|
||||
psWO->pfnTransformer = pfnTransformer;
|
||||
psWO->pTransformerArg = hTransformArg;
|
||||
|
||||
psWO->pfnProgress = GDALTermProgress;
|
||||
|
||||
if(osg::isNotifyEnabled(osg::NotifySeverity(osg::INFO + getNotifyOffset())))
|
||||
psWO->pfnProgress = GDALTermProgress;
|
||||
else
|
||||
psWO->pfnProgress = GDALDummyProgress;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* Setup band mapping. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user