From 3ee5ffbbf3eb1844aed55924413b559f9bf2c86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 11 Feb 2003 14:07:27 +0000 Subject: [PATCH] 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 --- konsole/konsole.cpp | 4 ++++ konsole/konsole_part.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/konsole/konsole.cpp b/konsole/konsole.cpp index 7fe8c8112..3d7b28771 100644 --- a/konsole/konsole.cpp +++ b/konsole/konsole.cpp @@ -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) { diff --git a/konsole/konsole_part.cpp b/konsole/konsole_part.cpp index 3dda35db7..d1f3f1f39 100644 --- a/konsole/konsole_part.cpp +++ b/konsole/konsole_part.cpp @@ -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 ) {