Changeset 353 for branches


Ignore:
Timestamp:
Apr 3, 2010, 9:00:18 PM (12 years ago)
Author:
dmik
Message:

branches/kmk: Only modify the field contents if it differs (avoids the "document modified" warning on close if no changes have been made).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/kmk/Lucide/gui/docViewer.cpp

    r352 r353  
    14591459            str[ len ] = 0;
    14601460            char *contents = uniSysToUtf8( str, NULL, NULL );
    1461             textField->setContents( ev, contents );
     1461            if ( strcmp( textField->getContents( ev ), contents ) ) {
     1462                // only modify the field if it differs
     1463                textField->setContents( ev, contents );
     1464                inputFields[ textFieldPage ].cache[ textFieldIndex ].modified = true;
     1465            }
    14621466            delete[] contents;
    14631467            delete[] str;
    1464             inputFields[ textFieldPage ].cache[ textFieldIndex ].modified = true;
    14651468        }
    14661469        textField = NULL;
Note: See TracChangeset for help on using the changeset viewer.