Advertisement
kalemas

Untitled

Dec 25th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.16 KB | None | 0 0
  1. diff --git a/src/frontend/bookshelfmanager/installpage/btinstallpage.cpp b/src/frontend/bookshelfmanager/installpage/btinstallpage.cpp
  2. index b8847da..8537308 100644
  3. --- a/src/frontend/bookshelfmanager/installpage/btinstallpage.cpp
  4. +++ b/src/frontend/bookshelfmanager/installpage/btinstallpage.cpp
  5. @@ -405,7 +405,11 @@ void BtInstallPage::slotSourceDelete() {
  6.  }
  7.  
  8.  void BtInstallPage::slotSourceIndexChanged(int index) {
  9. -    if (index < 0) index = 0;
  10. +    if (index < 0) {
  11. +        if(!m_sourceComboBox->count())
  12. +            return;
  13. +        index = 0;
  14. +    }
  15.  
  16.      /// \todo use pointers instead of text
  17.      QString moduleName = m_sourceComboBox->itemText(index);
  18. @@ -431,9 +435,10 @@ void BtInstallPage::slotSelectedModulesChanged() {
  19.  void BtInstallPage::slotSwordSetupChanged() {
  20.      QString moduleName = m_sourceComboBox->currentText();
  21.  
  22. -    initSourcesCombo();
  23. +    // clean m_sourceMap before initSourcesCombo() made too much work
  24.      qDeleteAll(m_sourceMap.values());
  25.      m_sourceMap.clear();
  26. +    initSourcesCombo();
  27.      m_sourceComboBox->setCurrentIndex(m_sourceComboBox->findText(moduleName));
  28.      initPathCombo();
  29.      m_modulesSelected = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement