Bug 76299 - Create template: overwriting by clicking on the existing template
Summary: Create template: overwriting by clicking on the existing template
Status: RESOLVED FIXED
Alias: None
Product: koffice
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KOffice Bug Wranglers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-27 18:35 UTC by Nicolas Goutte
Modified: 2004-02-28 21:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Goutte 2004-02-27 18:35:11 UTC
Version:            (using KDE KDE 3.2.0)
Compiler:          gcc 3.3.1 -march=pentium2
OS:          Linux

Currently, for overwriting a template, you have to enter its name, as you cannot get its name by clicking on it. (Usability problem.)

(This is a follow up of bug #73537 .)
Comment 1 Nicolas Goutte 2004-02-28 01:22:25 UTC
CVS commit by goutte: 

When a template gets selected, show its name in the name line edit.
CCMAIL:76299@bugs.kde.org


  M +9 -1      koTemplateCreateDia.cc   1.43


--- koffice/lib/kofficeui/koTemplateCreateDia.cc  #1.42:1.43
@@ -176,5 +176,13 @@ KoTemplateCreateDia::~KoTemplateCreateDi
 void KoTemplateCreateDia::slotSelectionChanged()
 {
-    d->m_remove->setEnabled(d->m_groups->currentItem());
+    const QListViewItem* item = d->m_groups->currentItem();
+    d->m_remove->setEnabled( item );
+    if ( ! item )
+        return;
+    
+    if ( item->depth() > 0 )
+    {
+        d->m_name->setText( item->text( 0 ) );
+    }
 }
 


Comment 2 Nicolas Goutte 2004-02-28 21:20:02 UTC
*** Bug has been marked as fixed ***.