Bug #2784140 Find & Replace insert text when nothing was found
This commit is contained in:
parent
5ad9659c19
commit
5894e44ac2
|
@ -1861,14 +1861,17 @@ void MyFrame::OnDialogReplace ( wxFindDialogEvent& event )
|
||||||
if ( ( doc = getActiveDocument() ) == NULL )
|
if ( ( doc = getActiveDocument() ) == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int regexWidth = 0;
|
if ( !doc->GetSelectedText().IsEmpty() )
|
||||||
if ( findReplacePanel->getRegex() )
|
|
||||||
{
|
{
|
||||||
regexWidth = doc->ReplaceTargetRE ( event.GetReplaceString() );
|
int regexWidth = 0;
|
||||||
}
|
if ( findReplacePanel->getRegex() )
|
||||||
else
|
{
|
||||||
{
|
regexWidth = doc->ReplaceTargetRE ( event.GetReplaceString() );
|
||||||
doc->ReplaceTarget ( event.GetReplaceString() );
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
doc->ReplaceTarget ( event.GetReplaceString() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OnDialogFind ( event );
|
OnDialogFind ( event );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue