mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Fixed Save/Reload Memory action
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@678 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -71,6 +71,15 @@ bool Memory::init(const std::string & dbUrl, bool dbOverwritten, const Parameter
|
||||
this->parseParameters(parameters);
|
||||
|
||||
UEventsManager::post(new RtabmapEventInit("Clearing memory..."));
|
||||
if(!_memoryChanged)
|
||||
{
|
||||
if(_dbDriver)
|
||||
{
|
||||
_dbDriver->closeConnection();
|
||||
delete _dbDriver;
|
||||
_dbDriver = 0;
|
||||
}
|
||||
}
|
||||
this->clear();
|
||||
UEventsManager::post(new RtabmapEventInit("Clearing memory, done!"));
|
||||
|
||||
@@ -1347,8 +1356,7 @@ void Memory::moveToTrash(Signature * s)
|
||||
}
|
||||
}
|
||||
|
||||
if(_memoryChanged &&
|
||||
_dbDriver &&
|
||||
if( _dbDriver &&
|
||||
s->id()>0)
|
||||
{
|
||||
_dbDriver->asyncSave(s);
|
||||
|
||||
Reference in New Issue
Block a user