[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kspread/dialogs
From:       Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date:       2009-01-14 11:32:19
Message-ID: 1231932739.482105.19694.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 910829 by mkruisselbrink:

make the font tab of the layout dialog actually work and not assert when an unknown \
font is used (and fix a porting error in the process, index is the second parameter \
for insertItem, not the first)


 M  +5 -7      LayoutDialog.cpp  


--- trunk/koffice/kspread/dialogs/LayoutDialog.cpp #910828:910829
@@ -1787,21 +1787,19 @@
    if ( dlg->bTextFontFamily )
    {
         selFont.setFamily( dlg->fontFamily );
-//         kDebug(36001) <<"Family =" << dlg->fontFamily;
+        // kDebug(36001) <<"Family =" << dlg->fontFamily;
 
-        // NOTE Stefan: the code below crashes, so assert, that we have a family
-        Q_ASSERT( family_combo->findItem( dlg->fontFamily ) );
-/*        if ( !family_combo->findItem(dlg->fontFamily))
+        if ( !family_combo->findItem(dlg->fontFamily))
                 {
-                family_combo->insertItem(0,"");
+                family_combo->insertItem("",0);
                 family_combo->setCurrentItem(0);
                 }
-        else*/
+        else
                 family_combo->setCurrentItem(family_combo->index(family_combo->findItem(dlg->fontFamily)));
  }
    else
    {
-        family_combo->insertItem(0,"");
+        family_combo->insertItem("",0);
         family_combo->setCurrentItem(0);
    }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic