Commit ea8c2e13 authored by Johannes Bergmeier's avatar Johannes Bergmeier

2 Usability improvements:

* Entering values with the keyboard will change the selected value
* Help Highlight is now independent from the value of selected cell

svn path=/trunk/KDE/kdegames/ksudoku/; revision=719166
parent 010379d4
......@@ -99,12 +99,14 @@ void KsView::enterValue(int value) {
if(!m_game.given(m_currentCell)) {
m_game.setValue(m_currentCell, value);
}
selectValue(value);
}
void KsView::markValue(int value) {
if(!m_game.given(m_currentCell)) {
m_game.flipMarker(m_currentCell, value);
}
selectValue(value);
}
void KsView::moveUp() {
......
......@@ -276,7 +276,7 @@ void QSudokuButton::exitEvent (QEvent *)
void QSudokuButton::keyPressEvent ( QKeyEvent * e )
{
if(e->modifiers() & Qt::ControlModifier)
emit beginHighlight(m_ksView.game().value(m_x,m_y));
emit beginHighlight();
e->ignore(); //pass on
}
......
......@@ -107,7 +107,7 @@ signals:
void numberset(int,int,int);
void beginHighlight(int val);
void beginHighlight(int val=0);
void finishHighlight();
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment