Remove the Undo closed window entry from the manager before opening the closed window.

BUG: 301974
REVIEW: 114780
FIXED-IN: 4.12.1
This commit is contained in:
Dawit Alemayehu 2014-01-01 10:02:08 -05:00
parent 67bb99c5de
commit ce040ab74f

View file

@ -130,7 +130,7 @@ void KonqUndoManager::undo()
KonqClosedItem* closedItem = m_closedItemList.first();
// Check what to undo
if (!m_supportsFileUndo || !KIO::FileUndoManager::self()->undoAvailable() || closedItem->serialNumber() > fileUndoManager->currentCommandSerialNumber()) {
if (!m_supportsFileUndo || !fileUndoManager->undoAvailable() || closedItem->serialNumber() > fileUndoManager->currentCommandSerialNumber()) {
undoClosedItem(0);
return;
}
@ -209,13 +209,13 @@ void KonqUndoManager::undoClosedItem(int index)
if(closedTabItem)
emit openClosedTab(*closedTabItem);
else if(closedRemoteWindowItem) {
emit openClosedWindow(*closedRemoteWindowItem);
KonqClosedWindowsManager::self()->removeClosedWindowItem(this, closedRemoteWindowItem);
emit openClosedWindow(*closedRemoteWindowItem);
} else if(closedWindowItem) {
emit openClosedWindow(*closedWindowItem);
KonqClosedWindowsManager::self()->removeClosedWindowItem(this, closedWindowItem);
emit openClosedWindow(*closedWindowItem);
closedWindowItem->configGroup().deleteGroup();
// Save config so that this window won't appear in new konqueror processes
KonqClosedWindowsManager::self()->saveConfig();
}