-rw-r--r-- | korganizer/ktimeedit.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp index 61a0931..df9b2fc 100644 --- a/korganizer/ktimeedit.cpp +++ b/korganizer/ktimeedit.cpp @@ -308,76 +308,74 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) setSelect ( 0 , 2 ); break; } break; // set cursor to correct place case Key_Left: if ( cpos == 3 ) --cpos; if ( cpos > 0) { lineEdit()->setCursorPosition(--cpos); setSelect ( cpos , 1 ); } else setSelect ( 0 , 1 ); break; // set cursor to correct place case Key_Right: if ( cpos == 1 ) ++cpos; if ( cpos < maxpos ) { lineEdit()->setCursorPosition(++cpos); setSelect ( cpos , 1 ); } break; // rest case Key_Prior: subTime(QTime(1,0,0)); break; case Key_Next: addTime(QTime(1,0,0)); break; case Key_Backspace: - qDebug("+++++++++++back "); if ( cpos > 0) { if ( cpos == 3 ) --cpos; if ( cpos > 5) cpos = 5; text.at( cpos-1 ) = '0'; lineEdit()->setText( text ); lineEdit()->setCursorPosition(--cpos); setSelect ( cpos , 1 ); changedText(); - qDebug("---------back "); } break; } // switch arrows // if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) { lineEdit()->deselect(); cpos = 0; lineEdit()->setCursorPosition(cpos); setSelect(cpos , 1); } if ( cpos == 2 ) { lineEdit()->setCursorPosition(++cpos); } // num keys when cursorPos preEnd if ( cpos < 5 ) { // switch another keys switch(e->key()) { case Key_Delete: text.at( cpos ) = '0'; lineEdit()->setText( text ); lineEdit()->setCursorPosition(cpos); setSelect ( cpos , 1 ); changedText(); break; case Key_9: case Key_8: case Key_7: case Key_6: if ( !(cpos == 1 || cpos == 4) ) |