Fix subthemes not appearing in the settings box
This commit is contained in:
		
							parent
							
								
									68d0b838cf
								
							
						
					
					
						commit
						70f39f33a6
					
				@ -108,12 +108,13 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app)
 | 
				
			|||||||
  // Fill the combobox with the names of the themes.
 | 
					  // Fill the combobox with the names of the themes.
 | 
				
			||||||
  ui_subtheme_combobox->addItem("server");
 | 
					  ui_subtheme_combobox->addItem("server");
 | 
				
			||||||
  ui_subtheme_combobox->addItem("default");
 | 
					  ui_subtheme_combobox->addItem("default");
 | 
				
			||||||
  QDirIterator it2(ao_app->get_base_path() + "themes/" + ao_app->current_theme, QDir::Dirs,
 | 
					  QDirIterator it2(ao_app->get_real_path(ao_app->get_theme_path("")), QDir::Dirs,
 | 
				
			||||||
                  QDirIterator::NoIteratorFlags);
 | 
					                  QDirIterator::NoIteratorFlags);
 | 
				
			||||||
  while (it2.hasNext()) {
 | 
					  while (it2.hasNext()) {
 | 
				
			||||||
    QString actualname = QDir(it2.next()).dirName();
 | 
					    QString actualname = QDir(it2.next()).dirName();
 | 
				
			||||||
    if (actualname != "." && actualname != ".." && actualname.toLower() != "server" && actualname.toLower() != "default" && actualname.toLower() != "effects" && actualname.toLower() != "misc")
 | 
					    if (actualname != "." && actualname != ".." && actualname.toLower() != "server" && actualname.toLower() != "default" && actualname.toLower() != "effects" && actualname.toLower() != "misc") {
 | 
				
			||||||
      ui_subtheme_combobox->addItem(actualname);
 | 
					      ui_subtheme_combobox->addItem(actualname);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_subtheme_combobox);
 | 
					  ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_subtheme_combobox);
 | 
				
			||||||
@ -1319,7 +1320,7 @@ void AOOptionsDialog::theme_changed(int i) {
 | 
				
			|||||||
  // Fill the combobox with the names of the themes.
 | 
					  // Fill the combobox with the names of the themes.
 | 
				
			||||||
  ui_subtheme_combobox->addItem("server");
 | 
					  ui_subtheme_combobox->addItem("server");
 | 
				
			||||||
  ui_subtheme_combobox->addItem("default");
 | 
					  ui_subtheme_combobox->addItem("default");
 | 
				
			||||||
  QDirIterator it(ao_app->get_base_path() + "themes/" + ui_theme_combobox->itemText(i), QDir::Dirs,
 | 
					  QDirIterator it(ao_app->get_real_path(ao_app->get_theme_path("", ui_theme_combobox->itemText(i))), QDir::Dirs,
 | 
				
			||||||
                  QDirIterator::NoIteratorFlags);
 | 
					                  QDirIterator::NoIteratorFlags);
 | 
				
			||||||
  while (it.hasNext()) {
 | 
					  while (it.hasNext()) {
 | 
				
			||||||
    QString actualname = QDir(it.next()).dirName();
 | 
					    QString actualname = QDir(it.next()).dirName();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user