Skip to content

Commit

Permalink
Merge 2609c41 into b66e259
Browse files Browse the repository at this point in the history
  • Loading branch information
beru authored Sep 23, 2019
2 parents b66e259 + 2609c41 commit 32b1681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion sakura_core/CSaveAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ void CSaveAgent::OnAfterSave(const SSaveInfo& sSaveInfo)
// 上書き(明示的な上書きや自動保存)では変更しない
// ---> 上書きの場合は一時的な折り返し桁変更やタブ幅変更を維持したままにする
if(!sSaveInfo.bOverwriteMode){
pcDoc->OnChangeSetting();
// 文書種別が変更になった場合にのみ設定変更を反映させる
int prevIndex = pcDoc->m_cDocType.GetDocumentType().GetIndex();
int newIndex = CDocTypeManager().GetDocumentTypeOfPath( sSaveInfo.cFilePath ).GetIndex();
if(newIndex != prevIndex)
pcDoc->OnChangeSetting();
}
}

Expand Down
7 changes: 6 additions & 1 deletion sakura_core/CWriteManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,16 @@ EConvertResult CWriteManager::WriteFile_From_CDocLineMgr(
}
}
CMemory cmemOutputBuffer;
constexpr DWORD userInterfaceInterval = 33;
DWORD prevTime = GetTickCount() + userInterfaceInterval;
while( pcDocLine ){
++nLineNumber;

//経過通知
if(pcDocLineMgr.GetLineCount()>0 && nLineNumber%1024==0){
DWORD currTime = GetTickCount();
DWORD diffTime = currTime - prevTime;
if(diffTime >= userInterfaceInterval){
prevTime = currTime;
NotifyProgress(nLineNumber * 100 / pcDocLineMgr.GetLineCount());
// 処理中のユーザー操作を可能にする
if( !::BlockingHook( NULL ) ){
Expand Down

0 comments on commit 32b1681

Please sign in to comment.