Skip to content

Commit

Permalink
fix needless save confirmation 2
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Mar 26, 2020
1 parent d4e2373 commit 8d0bca1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/RisohEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3748,7 +3748,6 @@ void MMainWnd::OnCompile(HWND hwnd)

// select the entry
SelectTV(entry, FALSE);
DoSetFileModified(TRUE);
}
else
{
Expand Down Expand Up @@ -5910,7 +5909,8 @@ BOOL MMainWnd::CompileStringTable(MStringA& strOutput, const MIdOrString& name,
// recalculate the splitter
PostMessageDx(WM_SIZE);

DoSetFileModified(TRUE);
if (bOK)
DoSetFileModified(TRUE);
return bOK;
}

Expand Down Expand Up @@ -6046,16 +6046,16 @@ BOOL MMainWnd::CompileMessageTable(MStringA& strOutput, const MIdOrString& name,
// recalculate the splitter
PostMessageDx(WM_SIZE);

DoSetFileModified(TRUE);
if (bOK)
DoSetFileModified(TRUE);

return bOK;
}

// compile a resource item source
BOOL MMainWnd::CompileParts(MStringA& strOutput, const MIdOrString& type, const MIdOrString& name,
WORD lang, const MStringW& strWide, BOOL bReopen)
{
DoSetFileModified(TRUE);

if (type == RT_STRING)
{
return CompileStringTable(strOutput, name, lang, strWide);
Expand Down Expand Up @@ -6130,6 +6130,8 @@ BOOL MMainWnd::CompileParts(MStringA& strOutput, const MIdOrString& type, const
// select the added entry
SelectTV(entry, FALSE);

DoSetFileModified(TRUE);

return TRUE; // success
}

Expand Down Expand Up @@ -6271,6 +6273,8 @@ BOOL MMainWnd::CompileParts(MStringA& strOutput, const MIdOrString& type, const
{
PostMessageDx(MYWM_REOPENRAD);
}

DoSetFileModified(TRUE);
}

// recalculate the splitter
Expand Down Expand Up @@ -11953,8 +11957,6 @@ void MMainWnd::DoAddRes(HWND hwnd, MAddResDlg& dialog)
SelectTV(ET_MESSAGE, dialog.m_type, (WORD)0, BAD_LANG, FALSE);
else
SelectTV(ET_LANG, dialog, FALSE);

DoSetFileModified(TRUE);
}
}

Expand Down

0 comments on commit 8d0bca1

Please sign in to comment.