summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpensetup.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/handwriting/qimpensetup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index d1297a9..3f4841d 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -323,13 +323,13 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
gl->setRowStretch( 1, 1 );
gl->addRowSpacing( 2, 35 );
gl->addRowSpacing( 3, 35 );
charSetCombo = new QComboBox( this );
gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 );
- connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int)));
+ connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSetVisible(int)));
QIMPenCharSetIterator it( profile->charSets() );
for ( ; it.current(); ++it ) {
charSetCombo->insertItem( it.current()->description() );
}
charList = new QListBox( this );
@@ -385,13 +385,13 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
hb->addWidget( pb );
pb = new QPushButton( tr("Cancel"), this );
connect( pb, SIGNAL(clicked()), SLOT(reject()) );
hb->addWidget( pb );
#endif
- selectCharSet( 0 );
+ selectCharSetVisible( 0 );
charList->setFocus();
resize( minimumSize() );
enableButtons();
}
@@ -401,13 +401,13 @@ void QIMPenEdit::setProfile( QIMPenProfile *p )
charSetCombo->clear();
QIMPenCharSetIterator it( profile->charSets() );
for ( ; it.current(); ++it ) {
if ( ! it.current()->hidden() )
charSetCombo->insertItem( it.current()->description() );
}
- selectCharSet( 0 );
+ selectCharSetVisible( 0 );
charList->setFocus();
enableButtons();
}
void QIMPenEdit::selectCharSet( QIMPenCharSet *c )
{
@@ -546,12 +546,23 @@ void QIMPenEdit::selectChar( int i )
}
if ( !it.current() )
setCurrentChar( 0 );
inputChar->clear();
}
+void QIMPenEdit::selectCharSetVisible( int c )
+{
+ int i = 0;
+ QIMPenCharSetIterator it( profile->charSets() );
+ for ( ; it.current(); ++it, i++ ) {
+ if ( charSetCombo->text( c ) == it.current()->description() ) {
+ selectCharSet( i );
+ }
+ }
+}
+
void QIMPenEdit::selectCharSet( int i )
{
if ( currentSet )
pw->removeCharSet( 0 );
currentSet = profile->charSets().at( i );
fillCharList();