Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions RetailCoder.VBE/UI/ToDoItems/ToDoExplorerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
<Setter Property="BorderBrush" Value="#adc6e5"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
</Trigger>
<!-- todo figure out how to make the gray background work when the item isn't active -->
<!--<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="LightGray"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
</MultiTrigger>-->
</Style.Triggers>
</Style>
<SolidColorBrush x:Key="ToolBarHorizontalBackground" Color="#FFEEF5FD"/>
Expand Down
4 changes: 3 additions & 1 deletion RetailCoder.VBE/UI/ToDoItems/ToDoExplorerControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ private void GroupingGridItem_MouseDoubleClick(object sender, MouseButtonEventAr
{
var viewModel = DataContext as ToDoExplorerViewModel;

if (viewModel != null)
// this seems idiotic, but if you hold CTRL while you double-click an item
// it both unselected the item and triggers the double-click, resulting in an NRE here
if (viewModel != null && viewModel.SelectedToDo != null)
{
viewModel.NavigateToToDo.Execute(new NavigateCodeEventArgs(viewModel.SelectedToDo.GetSelection()));
}
Expand Down
2 changes: 1 addition & 1 deletion RetailCoder.VBE/UI/ToDoItems/ToDoExplorerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ToDoExplorerViewModel : ViewModelBase
public ToDoExplorerViewModel(RubberduckParserState state, IGeneralConfigService configService)
{
_state = state;
_markers = configService.GetDefaultConfiguration().UserSettings.ToDoListSettings.ToDoMarkers;
_markers = configService.LoadConfiguration().UserSettings.ToDoListSettings.ToDoMarkers;

_uiDispatcher = Dispatcher.CurrentDispatcher;
}
Expand Down
6 changes: 4 additions & 2 deletions RubberduckTests/SourceControl/SCPresenterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class ScPresenterTests

private Mock<IFailedMessageView> _failedActionView;
private Mock<ILoginView> _loginView;
private Mock<ICloneRepositoryView> _cloneRepo;

[TestInitialize]
public void InitializeMocks()
Expand All @@ -62,6 +63,7 @@ public void InitializeMocks()

_failedActionView = new Mock<IFailedMessageView>();
_loginView = new Mock<ILoginView>();
_cloneRepo = new Mock<ICloneRepositoryView>();

_configService = new Mock<IConfigurationService<SourceControlConfiguration>>();

Expand All @@ -88,7 +90,7 @@ private SourceControlPresenter CreatePresenter()
_view.Object, _changesPresenter.Object, _branchesPresenter.Object,
_settingsPresenter.Object, _unsyncedPresenter.Object,
_folderBrowserFactory.Object, _providerFactory.Object,
_failedActionView.Object, _loginView.Object, new CodePaneWrapperFactory());
_failedActionView.Object, _loginView.Object, _cloneRepo.Object, new CodePaneWrapperFactory());
return presenter;
}

Expand Down Expand Up @@ -144,7 +146,7 @@ public void ChangesCurrentBranchRefreshesWhenBranchIsCheckedOut()
_view.Object, changesPresenter, branchesPresenter,
_settingsPresenter.Object, _unsyncedPresenter.Object,
_folderBrowserFactory.Object, _providerFactory.Object,
_failedActionView.Object, _loginView.Object, new CodePaneWrapperFactory());
_failedActionView.Object, _loginView.Object, _cloneRepo.Object, new CodePaneWrapperFactory());

//act
branchesView.Object.Current = "dev";
Expand Down