Get the correct font index by compensating for separators. I guess it didn't work since

http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdeui/kactionclasses.cpp#rev1.307

svn path=/trunk/kdebase/konsole/; revision=206282
This commit is contained in:
Luboš Luňák
2003-02-11 14:07:27 +00:00
parent ea0e9014af
commit 3ee5ffbbf3
2 changed files with 8 additions and 0 deletions

View File

@@ -1235,6 +1235,10 @@ void Konsole::slotSelectScrollbar() {
void Konsole::slotSelectFont() {
assert(se);
int item = selectFont->currentItem();
if( item > 9 ) // compensate for the two separators
--item;
if( item > 6 )
--item;
// KONSOLEDEBUG << "slotSelectFont " << item << endl;
if (item == DEFAULTFONT)
{

View File

@@ -573,6 +573,10 @@ void konsolePart::slotSelectScrollbar()
void konsolePart::slotSelectFont() {
int item = selectFont->currentItem();
if( item > 9 ) // compensate for the two separators
--item;
if( item > 6 )
--item;
// KONSOLEDEBUG << "slotSelectFont " << item << endl;
if (item == DEFAULTFONT) {
if ( KFontDialog::getFont(defaultFont, true) == QDialog::Rejected ) {