Bug 95880

Summary: digikam camera autodetect allows adding one camera multiple times
Product: [Applications] digikam Reporter: _ <praseodym+kdebugzilla>
Component: Setup-CamerasAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 0.7.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0

Description _ 2004-12-27 18:58:35 UTC
Version:           0.7 (using KDE KDE 3.3.2)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 
OS:                Linux

How to reproduce:
1. Connect a new camera
2. Go to the digikam camera settings
3. Click autodetect multiple times. The camera will be added multiple times.

Note that this does not occur when OK is clicked after adding the camera.
Comment 1 Renchi Raju 2004-12-27 22:43:04 UTC
CVS commit by pahlibar: 


just check in the currently listed cameras in the listview to prevent adding
the auto-detected cameras multiple times.
BUG: 95880


  M +2 -11     setupcamera.cpp   1.9


--- kdeextragear-3/digikam/utilities/setup/setupcamera.cpp  #1.8:1.9
@@ -192,15 +192,6 @@ void SetupCamera::slotAutoDetectCamera()
     }
 
-    bool found = false;
-
-    if(listView_->findItem(model,1)) {
-       CameraList* clist = CameraList::instance();
-       if (clist) {
-          if (clist->find(model))
-             found = true;
-       }
-    }
-
-    if (found) {
+    if (listView_->findItem(model,1))
+    {
        KMessageBox::information(this, i18n("Camera '%1' (%2) is already in list.").arg(model).arg(port));
     }