diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 201b5d9c7dfe..9667f5eac821 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1394,6 +1394,19 @@ void CallbackFlushHandler::queue(const int type, const char* data) assert(aCallbackData.validate() && "Validation after setJson failed!"); } } + else if (aTree.get<std::string>("action", "") == "created") + { + // Remove all previous actions on same dialog, if we are creating it anew. + removeAll([&nLOKWindowId](const queue_type::value_type& elem) { + if (elem.Type == LOK_CALLBACK_WINDOW) + { + const boost::property_tree::ptree& aOldTree = elem.getJson(); + if (nLOKWindowId == aOldTree.get<unsigned>("id", 0)) + return true; + } + return false; + }); + } } break; } |