Changeset 355 for branches/kmk/Lucide


Ignore:
Timestamp:
Apr 3, 2010, 9:34:23 PM (11 years ago)
Author:
dmik
Message:

branches/kmk: Reset the modified state if saved to the same file.

Location:
branches/kmk/Lucide/gui
Files:
3 edited

Legend:

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

    r354 r355  
    20882088}
    20892089
     2090void DocumentViewer::resetModifiedState()
     2091{
     2092    if ( inputFields != NULL ) {
     2093        for ( long pg = 0; pg < totalpages; ++pg ) {
     2094            if ( inputFields[ pg ].fields == NULL )
     2095                continue;
     2096            for ( unsigned long i = 0; i < inputFields[ pg ].fields->_length; ++i ) {
     2097                inputFields[ pg ].cache[ i ].modified = false;
     2098            }
     2099        }
     2100    }
     2101}
     2102
    20902103// handles WM_BUTTON1CLICK
    20912104BOOL DocumentViewer::wmClick( HWND hwnd, SHORT xpos, SHORT ypos )
  • branches/kmk/Lucide/gui/docViewer.h

    r352 r355  
    101101        void setFullscreen( bool _fullscreen );
    102102        void zoomInOut( bool zoomIn );
     103        void resetModifiedState();
    103104
    104105        static void registerClass();
  • branches/kmk/Lucide/gui/lucide.cpp

    r351 r355  
    691691                delete m;
    692692            }
     693            else
     694            {
     695                if ( stricmp( docFullName, fd->szFullFile ) == 0 )
     696                    docViewer->resetModifiedState();
     697            }
    693698        }
    694699    }
Note: See TracChangeset for help on using the changeset viewer.