修复无法安装列表第一个内核的问题

This commit is contained in:
gfdgd xi 2024-05-05 14:09:47 +08:00
parent 27bd1114cd
commit aee6385e10
2 changed files with 4 additions and 2 deletions

@ -1,2 +1,4 @@
deb [trusted=true] https://master.dl.sourceforge.net/project/gxde-kernel-manager/kernel/ ./
deb [trusted=true] https://kernel.gxde.gfdgdxi.top/ ./
# CN Mirror
deb [trusted=true] http://gfdgdxi.v5.idcfengye.com/gxde-linux-kernel/ ./

@ -73,7 +73,7 @@ void MainWindow::on_m_installButton_clicked()
{
QModelIndex list = ui->m_kernelShow->selectionModel()->currentIndex();
int row = list.row();
if(row <= 0) {
if(row < 0) {
// 未选中任何内容
QMessageBox::critical(this, tr("Error"), tr("Nothing to choose"));
return;
@ -120,7 +120,7 @@ void MainWindow::on_m_removeButton_clicked()
{
QModelIndex list = ui->m_kernelShow->selectionModel()->currentIndex();
int row = list.row();
if(row <= 0) {
if(row < 0) {
// 未选中任何内容
QMessageBox::critical(this, tr("Error"), tr("Nothing to choose"));
return;