Bug 95880 - digikam camera autodetect allows adding one camera multiple times
Summary: digikam camera autodetect allows adding one camera multiple times
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Setup-Cameras (show other bugs)
Version: 0.7.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-27 18:58 UTC by _
Modified: 2022-01-20 16:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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));
     }