loolwsd: fix impress; get viewid after initializeForRendering()
For impress, call to initializeForRendering() *changes* the viewid, so there's no point in remembering the viewid before call to initializeForRendering().
This commit is contained in:
parent
82e1769fe8
commit
6df1c4c6f7
1 changed files with 7 additions and 7 deletions
|
@ -1013,11 +1013,7 @@ private:
|
||||||
if (_multiView)
|
if (_multiView)
|
||||||
{
|
{
|
||||||
Log::info("Loading view to document from URI: [" + uri + "] for session [" + sessionId + "].");
|
Log::info("Loading view to document from URI: [" + uri + "] for session [" + sessionId + "].");
|
||||||
viewId = _loKitDocument->createView();
|
_loKitDocument->createView();
|
||||||
|
|
||||||
Log::info() << "Document [" << _url << "] view ["
|
|
||||||
<< viewId << "] loaded, leaving "
|
|
||||||
<< (_clientViews + 1) << " views." << Log::end;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1027,10 +1023,14 @@ private:
|
||||||
|
|
||||||
if (_multiView)
|
if (_multiView)
|
||||||
{
|
{
|
||||||
|
viewId = _loKitDocument->getView();
|
||||||
_viewIdToCallbackDescr.emplace(viewId,
|
_viewIdToCallbackDescr.emplace(viewId,
|
||||||
std::unique_ptr<CallbackDescriptor>(new CallbackDescriptor({ this, viewId })));
|
std::unique_ptr<CallbackDescriptor>(new CallbackDescriptor({ this, viewId })));
|
||||||
|
|
||||||
_loKitDocument->registerCallback(ViewCallback, _viewIdToCallbackDescr[viewId].get());
|
_loKitDocument->registerCallback(ViewCallback, _viewIdToCallbackDescr[viewId].get());
|
||||||
|
|
||||||
|
Log::info() << "Document [" << _url << "] view ["
|
||||||
|
<< viewId << "] loaded, leaving "
|
||||||
|
<< (_clientViews + 1) << " views." << Log::end;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue