Skip to content

Fixing wrong selection of person after adding a comment

When adding a comment to a person, it automatically selected the last person, due to a call to Petrack::updateControlWidget which is not needed here at all. Hence removing the function call, solves the issue.

void Petrack::updateControlWidget()
{
    mControlWidget->setTrackNumberAll(QString("%1").arg(mPersonStorage.nbPersons()));
    mControlWidget->setTrackShowOnlyNr(static_cast<int>(MAX(mPersonStorage.nbPersons(), 1)));
    mControlWidget->setTrackNumberVisible(QString("%1").arg(mPersonStorage.visible(mAnimation->getCurrentFrameNum())));
}

Closes #356 (closed)

Reviewer Checklist

General code quality

  • naming conventions are met (see .clang-tidy for detailed information)
  • no static analyzer warnings in new code parts (e.g., use clang-tidy for checking)

General usability

  • old versions of pet-files are still loadable

Only if changes in UI

  • new elements are also saved and loaded from pet-file
  • check if tab order is still correct
  • all new SpinBoxes are promoted
  • new keybindings added to Petrack::keyBindings()
Edited by d.kilic

Merge request reports

Loading