summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index a12c43e..d79a9b9 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -512,9 +512,9 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
KOrg::BaseView(calendar,parent,name)
{
-
+ mIsActiveWindow = false;
mCurItem = 0;
mCurItemRootParent = 0;
mCurItemParent = 0;
mCurItemAbove = 0;
@@ -949,8 +949,9 @@ void KOTodoView::storeCurrentItem()
mCurItem = 0;
mCurItemRootParent = 0;
mCurItemParent = 0;
mCurItemAbove = 0;
+ mIsActiveWindow = topLevelWidget()->isActiveWindow();
mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
if (mActiveItem) {
mCurItem = mActiveItem->todo();
KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove ();
@@ -1017,9 +1018,10 @@ void KOTodoView::resetCurrentItem()
QTimer::singleShot( 100, this, SLOT ( resetFocusToList() ));
}
void KOTodoView::resetFocusToList()
{
- topLevelWidget()->setActiveWindow();
+ if ( mIsActiveWindow )
+ topLevelWidget()->setActiveWindow();
mTodoListView->setFocus();
}
//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove;
bool KOTodoView::checkTodo( Todo * todo )