Browse Source

fix FileName comparison warning and make DefinitionViewPad less intrusive during solution load

pull/59/merge
Siegfried Pammer 12 years ago
parent
commit
f96f8dfd55
  1. 4
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  2. 10
      src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs

4
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -243,7 +243,9 @@
</Compile> </Compile>
<Compile Include="Src\Gui\Components\LocalizedPropertyGrid\BooleanTypeConverter.cs" /> <Compile Include="Src\Gui\Components\LocalizedPropertyGrid\BooleanTypeConverter.cs" />
<Compile Include="Src\Gui\Components\SideBar\TextEditorSideBar.cs" /> <Compile Include="Src\Gui\Components\SideBar\TextEditorSideBar.cs" />
<Compile Include="Src\Gui\Components\StringListEditorDialog.xaml.cs" /> <Compile Include="Src\Gui\Components\StringListEditorDialog.xaml.cs">
<DependentUpon>StringListEditorDialog.xaml</DependentUpon>
</Compile>
<Compile Include="Src\Gui\Components\StringListEditorXaml.xaml.cs"> <Compile Include="Src\Gui\Components\StringListEditorXaml.xaml.cs">
<DependentUpon>StringListEditorXaml.xaml</DependentUpon> <DependentUpon>StringListEditorXaml.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>

10
src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs

@ -85,8 +85,9 @@ namespace ICSharpCode.SharpDevelop.Gui
async void UpdateTick(ParseInformationEventArgs e) async void UpdateTick(ParseInformationEventArgs e)
{ {
timer.IsEnabled = ctl.IsVisible; bool isActive = ctl.IsVisible && !SD.ParserService.LoadSolutionProjectsThread.IsRunning;
if (!ctl.IsVisible) return; timer.IsEnabled = isActive;
if (!isActive) return;
LoggingService.Debug("DefinitionViewPad.Update"); LoggingService.Debug("DefinitionViewPad.Update");
ResolveResult res = await ResolveAtCaretAsync(e); ResolveResult res = await ResolveAtCaretAsync(e);
@ -123,8 +124,9 @@ namespace ICSharpCode.SharpDevelop.Gui
{ {
if (pos.Equals(oldPosition)) return; if (pos.Equals(oldPosition)) return;
oldPosition = pos; oldPosition = pos;
if (pos.FileName != currentFileName) var fileName = new FileName(pos.FileName);
LoadFile(new FileName(pos.FileName)); if (fileName != currentFileName)
LoadFile(fileName);
ctl.TextArea.Caret.Location = pos.Begin; ctl.TextArea.Caret.Location = pos.Begin;
Rect r = ctl.TextArea.Caret.CalculateCaretRectangle(); Rect r = ctl.TextArea.Caret.CalculateCaretRectangle();
if (!r.IsEmpty) { if (!r.IsEmpty) {

Loading…
Cancel
Save