@@ -65,6 +65,11 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog(QWidget *parent, Qt::WFlags
65
65
on_pbnFirst_clicked ();
66
66
else
67
67
on_pbnNew_clicked ();
68
+ // automatically go to insert mode if there are not recs yet
69
+ if (mRecordCountLong <1 )
70
+ {
71
+ on_pbnNew_clicked ();
72
+ }
68
73
}
69
74
70
75
QgsCustomProjectionDialog::~QgsCustomProjectionDialog ()
@@ -428,15 +433,23 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()
428
433
// enable nav buttons as appropriate
429
434
pbnFirst->setEnabled (false );
430
435
pbnPrevious->setEnabled (false );
431
- if (mCurrentRecordLong ==mRecordCountLong )
436
+ // automatically go to insert mode if there are not recs yet
437
+ if (mRecordCountLong < 1 )
438
+ {
439
+ on_pbnNew_clicked ();
440
+ pbnDelete->setEnabled (false );
441
+ }
442
+ else if (mCurrentRecordLong ==mRecordCountLong )
432
443
{
433
444
pbnNext->setEnabled (false );
434
445
pbnLast->setEnabled (false );
446
+ pbnDelete->setEnabled (false );
435
447
}
436
448
else
437
449
{
438
450
pbnNext->setEnabled (true );
439
451
pbnLast->setEnabled (true );
452
+ pbnDelete->setEnabled (false );
440
453
}
441
454
}
442
455
@@ -694,6 +707,7 @@ void QgsCustomProjectionDialog::on_pbnNew_clicked()
694
707
pbnPrevious->setEnabled (false );
695
708
pbnNext->setEnabled (false );
696
709
pbnLast->setEnabled (false );
710
+ pbnDelete->setEnabled (false );
697
711
pbnNew->setText (tr (" Abort" ));
698
712
// clear the controls
699
713
leName->setText (" " );
0 commit comments