mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 18:39:40 +00:00
Workaround inconsistencies with record status changes
This commit is contained in:
parent
1518d630ca
commit
c1ec926f43
1 changed files with 17 additions and 3 deletions
|
@ -195,6 +195,10 @@ namespace CSMWorld
|
||||||
int start = getHighestIndex(topLeft).row();
|
int start = getHighestIndex(topLeft).row();
|
||||||
int end = getHighestIndex(botRight).row();
|
int end = getHighestIndex(botRight).row();
|
||||||
|
|
||||||
|
// A change to record status (ex. Deleted) returns an invalid botRight
|
||||||
|
if (end == -1)
|
||||||
|
end = start;
|
||||||
|
|
||||||
// Handle each record
|
// Handle each record
|
||||||
for (int row = start; row <= end; ++row)
|
for (int row = start; row <= end; ++row)
|
||||||
{
|
{
|
||||||
|
@ -245,6 +249,11 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
int start = getHighestIndex(topLeft).row();
|
int start = getHighestIndex(topLeft).row();
|
||||||
int end = getHighestIndex(botRight).row();
|
int end = getHighestIndex(botRight).row();
|
||||||
|
|
||||||
|
// A change to record status (ex. Deleted) returns an invalid botRight
|
||||||
|
if (end == -1)
|
||||||
|
end = start;
|
||||||
|
|
||||||
for (int row = start; row <= end; ++row)
|
for (int row = start; row <= end; ++row)
|
||||||
{
|
{
|
||||||
std::string raceId = mRaces.getId(row);
|
std::string raceId = mRaces.getId(row);
|
||||||
|
@ -299,9 +308,14 @@ namespace CSMWorld
|
||||||
|
|
||||||
void ActorAdapter::handleBodyPartChanged(const QModelIndex& topLeft, const QModelIndex& botRight)
|
void ActorAdapter::handleBodyPartChanged(const QModelIndex& topLeft, const QModelIndex& botRight)
|
||||||
{
|
{
|
||||||
int rowStart = getHighestIndex(topLeft).row();
|
int start = getHighestIndex(topLeft).row();
|
||||||
int rowEnd = getHighestIndex(botRight).row();
|
int end = getHighestIndex(botRight).row();
|
||||||
for (int row = rowStart; row <= rowEnd; ++row)
|
|
||||||
|
// A change to record status (ex. Deleted) returns an invalid botRight
|
||||||
|
if (end == -1)
|
||||||
|
end = start;
|
||||||
|
|
||||||
|
for (int row = start; row <= end; ++row)
|
||||||
{
|
{
|
||||||
// Race specified by part may need update
|
// Race specified by part may need update
|
||||||
auto& record = mBodyParts.getRecord(row);
|
auto& record = mBodyParts.getRecord(row);
|
||||||
|
|
Loading…
Reference in a new issue