-rw-r--r-- | core/pim/todo/mainwindow.cpp | 3 | ||||
-rw-r--r-- | core/pim/todo/tableview.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 7810285..58981ca 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -625,16 +625,17 @@ void MainWindow::slotShowDue(bool ov) { raiseCurrentView(); } void MainWindow::slotShow( int uid ) { qWarning("slotShow"); currentShow()->slotShow( event( uid ) ); m_stack->raiseWidget( currentShow()->widget() ); } void MainWindow::slotEdit( int uid ) { + if (uid == 1 ) return; if(m_syncing) { QMessageBox::warning(this, QWidget::tr("Todo"), QWidget::tr("Can not edit data, currently syncing")); return; } OTodo todo = m_todoMgr.event( uid ); @@ -786,17 +787,17 @@ void MainWindow::beam( int uid) { OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) ); OTodoAccess acc( cal ); acc.load(); acc.add( todo ); acc.save(); Ir* ir = new Ir(this ); connect(ir, SIGNAL(done(Ir*) ), this, SLOT(beamDone(Ir*) ) ); - ir->send( beamfile, todo.summary(), "text/x-vCalendar" ); + ir->send(beamfile, todo.summary(), "text/x-vCalendar" ); } void MainWindow::show( int uid ) { slotShow( uid ); } void MainWindow::edit( int uid ) { slotEdit( uid ); } void MainWindow::add( const OPimRecord& rec) { diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index ae27fab..d9cda09 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -138,16 +138,17 @@ void TableView::slotShowMenu() { QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); menu->exec(QCursor::pos() ); delete menu; } QString TableView::type() const { return QString::fromLatin1( tr("Table View") ); } int TableView::current() { + if (numRows() == 0 ) return 1; int uid = sorted().uidAt(currentRow() ); return uid; } QString TableView::currentRepresentation() { OTodo to = sorted()[currentRow()]; return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; } |