Index: Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj
===================================================================
diff -u -rcff3810225268135255996e7a2e86de4733b03e8 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision cff3810225268135255996e7a2e86de4733b03e8)
+++ Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -91,7 +91,6 @@
ExceptionDialog.cs
-
Index: Core/Common/src/Core.Common.Controls/ViewInfo.cs
===================================================================
diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Controls/ViewInfo.cs (.../ViewInfo.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37)
+++ Core/Common/src/Core.Common.Controls/ViewInfo.cs (.../ViewInfo.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -22,11 +22,6 @@
public Type ViewType { get; set; }
///
- /// Type of the composite view to which this view belongs
- ///
- public Type CompositeViewType { get; set; }
-
- ///
/// Description of the view (shown to the user when there is more then one view for an item)
///
public string Description { get; set; }
@@ -85,11 +80,6 @@
public Action OnActivateView { get; set; }
///
- /// Gets the data for the composite view of which this is the child view info
- ///
- public Func GetCompositeViewData { get; set; }
-
- ///
/// Override the default closing of the view constructed with this info
///
/// - View to close
@@ -136,8 +126,6 @@
}
}
- public Type CompositeViewType { get; set; }
-
public string Description { get; set; }
public Func GetViewName { get; set; }
@@ -152,8 +140,6 @@
public Action OnActivateView { get; set; }
- public Func GetCompositeViewData { get; set; }
-
public Func CloseForData { get; set; }
public static implicit operator ViewInfo(ViewInfo viewInfo)
@@ -163,12 +149,10 @@
DataType = viewInfo.DataType,
ViewDataType = viewInfo.ViewDataType,
ViewType = viewInfo.ViewType,
- CompositeViewType = viewInfo.CompositeViewType,
Description = viewInfo.Description,
Image = viewInfo.Image,
AdditionalDataCheck = o => viewInfo.AdditionalDataCheck == null || viewInfo.AdditionalDataCheck((TData) o),
GetViewData = o => viewInfo.GetViewData != null ? viewInfo.GetViewData((TData) o) : o,
- GetCompositeViewData = o => viewInfo.GetCompositeViewData != null ? viewInfo.GetCompositeViewData((TData) o) : null,
CloseForData = (v, o) => viewInfo.CloseForData != null && viewInfo.CloseForData((TView) v, o),
AfterCreate = (v, o) =>
{
Fisheye: Tag 0d8098264ea05ccbf529b3c2c54479fdbc0ef670 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls/Views/ICompositeView.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewList.cs
===================================================================
diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewList.cs (.../ViewList.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewList.cs (.../ViewList.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -3,7 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
using Core.Common.Gui.Properties;
using Core.Common.Utils.Collections;
@@ -22,15 +21,11 @@
public event NotifyCollectionChangedEventHandler CollectionChanged;
- public event NotifyCollectionChangedEventHandler ChildViewChanged;
private static readonly ILog Log = LogManager.GetLogger(typeof(ViewList));
private readonly ViewLocation? defaultLocation;
private readonly IDockingManager dockingManager;
private readonly IList views;
- private readonly IDictionary childViewSubscribtionLookup =
- new Dictionary();
-
private IView activeView;
private bool clearing; // used to skip view activation when it is not necessary
@@ -136,8 +131,6 @@
dockingManager.Dispose();
- childViewSubscribtionLookup.Clear();
-
Gui = null;
}
@@ -267,17 +260,6 @@
{
yield return (T) view;
}
-
- var compositeView = view as ICompositeView;
- if (compositeView == null)
- {
- continue;
- }
-
- foreach (var childView in FindViewsRecursive(compositeView.ChildViews))
- {
- yield return childView;
- }
}
}
@@ -385,13 +367,6 @@
FireCollectionChangedEvent(NotifyCollectionChangeAction.Remove, oldIndex, view);
- var compositeView = view as ICompositeView;
- if (compositeView != null)
- {
- compositeView.ChildViews.CollectionChanged -= childViewSubscribtionLookup[view];
- childViewSubscribtionLookup.Remove(view);
- }
-
// remove from docking manager
dockingManager.Remove(view, removeTabFromDockingManager);
@@ -402,23 +377,6 @@
{
view.Data = null; // reset data for view
- // deep clean-up
- var compositeView = view as ICompositeView;
- if (compositeView != null)
- {
- foreach (var childView in compositeView.ChildViews)
- {
- if (childView == null)
- {
- Log.WarnFormat(Resources.ViewList_ForceViewCleanup_A_view_within_0_has_no_value, view);
- }
- else
- {
- ForceViewCleanup(childView);
- }
- }
- }
-
if (!DoNotDisposeViewsOnRemove)
{
// performance improvement.
@@ -472,14 +430,6 @@
}
}
- private void FireChildViewChangedEvent(NotifyCollectionChangingEventArgs args, IView view)
- {
- if (ChildViewChanged != null)
- {
- ChildViewChanged(this, new NotifyCollectionChangingEventArgs(args.Action, view, args.Index, -1));
- }
- }
-
private void Insert(int index, IView view, ViewLocation viewLocation)
{
// activate view only if it is already added
@@ -500,13 +450,6 @@
FireCollectionChangedEvent(NotifyCollectionChangeAction.Add, index, view);
- var compositeView = view as ICompositeView;
- if (compositeView != null)
- {
- childViewSubscribtionLookup[view] = (sender, args) => FireChildViewChangedEvent(args, view);
- compositeView.ChildViews.CollectionChanged += childViewSubscribtionLookup[view];
- }
-
ActiveView = view;
}
}
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs
===================================================================
diff -u -r65c12731b5bc4f7dd185b779c801b9ee319e4e3a -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs (.../ViewResolver.cs) (revision 65c12731b5bc4f7dd185b779c801b9ee319e4e3a)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs (.../ViewResolver.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -61,9 +61,6 @@
return false;
}
- // Filter on composite view infos
- viewInfoList = FilterCompositeViewsForChildViews(viewInfoList).ToList();
-
if (!alwaysShowDialog)
{
if (viewInfoList.Count == 1)
@@ -135,16 +132,15 @@
return data != null && GetViewInfosFor(data, viewType).Any();
}
- public IList GetViewsForData(object data, bool includeChildViews = false)
+ public IList GetViewsForData(object data)
{
- return GetViewsForData(viewList.Where(v => !(v is IAdditionalView)), data, includeChildViews).ToList();
+ return GetViewsForData(viewList.Where(v => !(v is IAdditionalView)), data).ToList();
}
public void CloseAllViewsFor(object data)
{
DoWithMatchingViews(data, viewList,
v => viewList.Remove(v),
- (compV, view) => compV.ChildViews.Remove(view),
(v, o) => v.ViewInfo != null && v.ViewInfo.CloseForData(v, o));
}
@@ -176,7 +172,7 @@
///
internal static bool IsViewOpening { get; private set; }
- private void DoWithMatchingViews(object data, IEnumerable views, Action viewAction, Action compositeViewAction, Func extraCheck = null)
+ private void DoWithMatchingViews(object data, IEnumerable views, Action viewAction, Func extraCheck = null)
{
var viewsToCheck = views.ToList();
foreach (var view in viewsToCheck)
@@ -185,23 +181,15 @@
{
viewAction(view);
}
-
- var compositeView = view as ICompositeView;
- if (compositeView == null || compositeView.HandlesChildViews)
- {
- continue;
- }
-
- DoWithMatchingViews(data, compositeView.ChildViews, v => compositeViewAction(compositeView, v), compositeViewAction);
}
}
- private IEnumerable GetViewsForData(IEnumerable viewsToCheck, object data, bool includeChildViews = true)
+ private IEnumerable GetViewsForData(IEnumerable viewsToCheck, object data)
{
return data != null
- ? GetOpenViewsFor(viewsToCheck, data, includeChildViews, (v, vi) =>
- !(v is IReusableView && !((IReusableView) v).Locked &&
- data.GetType().Implements(vi.DataType)))
+ ? GetOpenViewsFor(viewsToCheck, data, (v, vi) =>
+ !(v is IReusableView && !((IReusableView) v).Locked &&
+ data.GetType().Implements(vi.DataType)))
: Enumerable.Empty();
}
@@ -214,12 +202,6 @@
return viewInfos.Where(i => !dataTypes.Any(t => t != i.DataType && t.Implements(i.DataType)));
}
- private static IEnumerable FilterCompositeViewsForChildViews(IList viewInfoList)
- {
- var compositeViewTypes = viewInfoList.Select(vi => vi.CompositeViewType).Where(t => t != null).ToList();
- return viewInfoList.Where(vi => !compositeViewTypes.Contains(vi.ViewType));
- }
-
private bool CreateViewFromViewInfo(object data, ViewInfo viewInfo)
{
var viewData = viewInfo.GetViewData(data);
@@ -228,104 +210,35 @@
: GetOpenViewsFor(viewList, data).Concat(GetOpenViewsFor(viewList, viewData)))
.FirstOrDefault(v => v.GetType() == viewInfo.ViewType);
- if (viewInfo.CompositeViewType == null)
+ if (view != null)
{
- if (view != null)
- {
- viewInfo.OnActivateView(view, data);
- viewList.ActiveView = view;
- return true;
- }
-
- var reusableView = FindViewsRecursive(viewList).FirstOrDefault(rv =>
- !rv.Locked &&
- IsDataForView(rv, viewData) &&
- viewInfo.ViewDataType == rv.ViewInfo.ViewDataType);
-
- if (reusableView != null)
- {
- // Set reusable view data
- reusableView.Data = viewData;
- viewInfo.AfterCreate(reusableView, data);
- viewInfo.OnActivateView(reusableView, data);
- viewList.ActiveView = reusableView;
-
- if (viewList.UpdateViewNameAction != null)
- {
- viewList.UpdateViewNameAction(reusableView);
- }
- return true;
- }
-
- viewList.Add(CreateViewForData(data, viewInfo));
+ viewInfo.OnActivateView(view, data);
+ viewList.ActiveView = view;
return true;
}
- var compositeView = GetCompositeView(data, viewInfo);
- if (compositeView == null)
- {
- return false;
- }
+ var reusableView = FindViewsRecursive(viewList).FirstOrDefault(rv =>
+ !rv.Locked &&
+ IsDataForView(rv, viewData) &&
+ viewInfo.ViewDataType == rv.ViewInfo.ViewDataType);
- viewList.ActiveView = compositeView;
-
- var childView = GetChildView(data, viewInfo, view, compositeView);
- if (childView == null)
+ if (reusableView != null)
{
- return false;
- }
+ // Set reusable view data
+ reusableView.Data = viewData;
+ viewInfo.AfterCreate(reusableView, data);
+ viewInfo.OnActivateView(reusableView, data);
+ viewList.ActiveView = reusableView;
- compositeView.ActivateChildView(childView);
- return true;
- }
-
- private IView GetChildView(object data, ViewInfo viewInfo, IView view, ICompositeView compositeView)
- {
- var childView = view ?? compositeView.ChildViews.FirstOrDefault(v => v.Data == data);
-
- if (childView == null && !compositeView.HandlesChildViews)
- {
- // Add child view to composite view
- childView = CreateViewForData(data, viewInfo);
- compositeView.ChildViews.Add(childView);
- if (!compositeView.HandlesChildViews && viewList.UpdateViewNameAction != null)
+ if (viewList.UpdateViewNameAction != null)
{
- viewList.UpdateViewNameAction(childView);
+ viewList.UpdateViewNameAction(reusableView);
}
+ return true;
}
- else
- {
- viewInfo.OnActivateView(childView, data);
- }
- return childView;
- }
- private ICompositeView GetCompositeView(object data, ViewInfo viewInfo)
- {
- var compositeViewInfo = ViewInfos.FirstOrDefault(vi => vi.ViewType == viewInfo.CompositeViewType);
- if (compositeViewInfo == null)
- {
- return null;
- }
-
- var compositeViewData = compositeViewInfo.GetViewData(viewInfo.GetCompositeViewData(data));
- if (compositeViewData == null)
- {
- return null;
- }
-
- var compositeView = ((IEnumerable) TypeUtils.CallGenericMethod(GetType(), "FindViewsRecursive", viewInfo.CompositeViewType, this, viewList))
- .FirstOrDefault(v => v.Data.Equals(compositeViewData) && (!v.HandlesChildViews || v.ChildViews.Any(cv => cv.Data == data)));
-
- if (compositeView == null)
- {
- compositeView = (ICompositeView) CreateViewForData(compositeViewData, compositeViewInfo);
- viewList.Add(compositeView);
- }
-
- compositeViewInfo.OnActivateView(compositeView, data);
-
- return compositeView;
+ viewList.Add(CreateViewForData(data, viewInfo));
+ return true;
}
private static IView CreateViewForData(object data, ViewInfo viewInfo)
@@ -376,7 +289,7 @@
return selectedViewInfo;
}
- private IEnumerable GetOpenViewsFor(IEnumerable viewsToCheck, object data, bool includeChildViews = true, Func extraCheck = null)
+ private IEnumerable GetOpenViewsFor(IEnumerable viewsToCheck, object data, Func extraCheck = null)
{
if (data == null)
{
@@ -391,28 +304,6 @@
{
yield return view;
}
-
- if (!includeChildViews)
- {
- continue;
- }
-
- var compositeView = view as ICompositeView;
- if (compositeView == null || compositeView.HandlesChildViews)
- {
- continue;
- }
-
- var childViews = GetOpenViewsFor(compositeView.ChildViews, data).ToList();
- if (!childViews.Any())
- {
- continue;
- }
-
- foreach (var childView in childViews)
- {
- yield return childView;
- }
}
}
@@ -477,17 +368,6 @@
{
yield return (T) view;
}
-
- var compositeView = view as ICompositeView;
- if (compositeView == null)
- {
- continue;
- }
-
- foreach (var childView in FindViewsRecursive(compositeView.ChildViews))
- {
- yield return childView;
- }
}
}
}
Index: Core/Common/src/Core.Common.Gui/IViewList.cs
===================================================================
diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/IViewList.cs (.../IViewList.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37)
+++ Core/Common/src/Core.Common.Gui/IViewList.cs (.../IViewList.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
-using Core.Common.Utils.Collections;
using Core.Common.Utils.Collections.Generic;
namespace Core.Common.Gui
@@ -34,11 +32,6 @@
event EventHandler ActiveViewChanged;
///
- /// Fired when a childview is added to a view
- ///
- event NotifyCollectionChangedEventHandler ChildViewChanged;
-
- ///
/// HACK: Hack to disable activation temporarily
///
bool IgnoreActivation { get; set; }
Index: Core/Common/src/Core.Common.Gui/IViewResolver.cs
===================================================================
diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/IViewResolver.cs (.../IViewResolver.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37)
+++ Core/Common/src/Core.Common.Gui/IViewResolver.cs (.../IViewResolver.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -47,9 +47,8 @@
/// Returns all currently opened views for the same data.
///
///
- /// Include child views of a composite view in the results
///
- IList GetViewsForData(object data, bool includeChildViews = false);
+ IList GetViewsForData(object data);
///
/// Closes all views for .
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs
===================================================================
diff -u -r12c5ceb5471938a64061362a809cab802f00eb30 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 12c5ceb5471938a64061362a809cab802f00eb30)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.18408
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -2514,15 +2514,6 @@
}
///
- /// Looks up a localized string similar to Onverwacht gedrag van het samengestelde documentvenster. Een documentvenster binnen het samengestelde documentvenster '{0}' heeft geen waarde..
- ///
- public static string ViewList_ForceViewCleanup_A_view_within_0_has_no_value {
- get {
- return ResourceManager.GetString("ViewList_ForceViewCleanup_A_view_within_0_has_no_value", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Er is geen standaardlocatie opgegeven. Kan geen documentvenster toevoegen zonder de locatie parameter..
///
public static string ViewList_Insert_No_default_location_specified_Cannot_add_a_view_without_location_parameter_ {
Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx
===================================================================
diff -u -r12c5ceb5471938a64061362a809cab802f00eb30 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 12c5ceb5471938a64061362a809cab802f00eb30)
+++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -247,9 +247,6 @@
Opslaan
-
- Onverwacht gedrag van het samengestelde documentvenster. Een documentvenster binnen het samengestelde documentvenster '{0}' heeft geen waarde.
-
Standaardschermen aan het maken...
Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs
===================================================================
diff -u -r25019cc752a91361f32968c26d48064ed35a916c -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 25019cc752a91361f32968c26d48064ed35a916c)
+++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -799,7 +799,6 @@
documentViewManager.ActiveViewChanging += ActiveViewChanging;
documentViewManager.ActiveViewChanged += OnActiveViewChanged;
documentViewManager.CollectionChanged += DocumentViewsCollectionChanged;
- documentViewManager.ChildViewChanged += DocumentViewManagerOnChildViewChanged;
documentViews = documentViewManager;
@@ -844,16 +843,6 @@
mainWindow.ValidateItems();
}
- private void DocumentViewManagerOnChildViewChanged(object sender, NotifyCollectionChangingEventArgs notifyCollectionChangingEventArgs)
- {
- if (isExiting)
- {
- return;
- }
-
- mainWindow.ValidateItems();
- }
-
private static string GetViewName(IView view)
{
return (view.ViewInfo != null ? view.ViewInfo.GetViewName(view, view.Data) : null) ?? "";
Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ChartViewCommandBase.cs
===================================================================
diff -u -rf710b3aa8d8acb2ee8f24d154e256f9ca2272d28 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ChartViewCommandBase.cs (.../ChartViewCommandBase.cs) (revision f710b3aa8d8acb2ee8f24d154e256f9ca2272d28)
+++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ChartViewCommandBase.cs (.../ChartViewCommandBase.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -44,18 +44,7 @@
{
return (T) view;
}
- var compositeView = view as ICompositeView;
- if (compositeView != null)
- {
- foreach (var childView in compositeView.ChildViews)
- {
- var childOfTypeT = GetViewRecursive(childView);
- if (childOfTypeT != null)
- {
- return childOfTypeT;
- }
- }
- }
+
return null;
}
}
Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/RulerCommand.cs
===================================================================
diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/RulerCommand.cs (.../RulerCommand.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37)
+++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/RulerCommand.cs (.../RulerCommand.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -1,5 +1,4 @@
-using Core.Common.Controls;
-using Core.Common.Controls.Swf.Charting;
+using Core.Common.Controls.Swf.Charting;
using Core.Common.Controls.Swf.Charting.Tools;
using Core.Common.Controls.Views;
using Core.Common.Gui;
@@ -47,21 +46,7 @@
private ChartView GetChartViewWithRulerRecursive(IView view)
{
var chartView = view as ChartView;
- if (chartView == null)
- {
- var compositeView = view as ICompositeView;
- if (compositeView != null)
- {
- foreach (var childView in compositeView.ChildViews)
- {
- var v = GetChartViewWithRulerRecursive(childView);
- if (v != null)
- {
- return v;
- }
- }
- }
- }
+
return chartView == null ? null :
chartView.GetTool() == null ? null :
chartView;
Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/CommonToolsGuiPlugin.cs
===================================================================
diff -u -r65c12731b5bc4f7dd185b779c801b9ee319e4e3a -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Plugins/src/Core.Plugins.CommonTools.Gui/CommonToolsGuiPlugin.cs (.../CommonToolsGuiPlugin.cs) (revision 65c12731b5bc4f7dd185b779c801b9ee319e4e3a)
+++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/CommonToolsGuiPlugin.cs (.../CommonToolsGuiPlugin.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -119,7 +119,6 @@
Gui.DocumentViews.ActiveViewChanging += DocumentViewsActiveViewChanging;
Gui.DocumentViews.ActiveViewChanged += DocumentViewsActiveViewChanged;
- Gui.DocumentViews.ChildViewChanged += DocumentViewsOnChildViewChanged;
Gui.DocumentViews.CollectionChanged += ViewsCollectionChanged;
}
@@ -149,7 +148,6 @@
Gui.DocumentViews.ActiveViewChanging -= DocumentViewsActiveViewChanging;
Gui.DocumentViews.ActiveViewChanged -= DocumentViewsActiveViewChanged;
- Gui.DocumentViews.ChildViewChanged -= DocumentViewsOnChildViewChanged;
Gui.DocumentViews.CollectionChanged -= ViewsCollectionChanged;
}
}
@@ -186,8 +184,6 @@
private void DocumentViewsActiveViewChanged()
{
- Subscribe();
-
UpdateChartLegendView();
}
@@ -198,8 +194,6 @@
private void DocumentViewsActiveViewChanging()
{
- Unsubscribe();
-
UpdateChartLegendView();
}
@@ -232,14 +226,6 @@
Gui.MainWindow.ValidateItems();
}
-
-
-
- private void DocumentViewsOnChildViewChanged(object sender, NotifyCollectionChangingEventArgs notifyCollectionChangingEventArgs)
- {
- DocumentViewsActiveViewChanged();
- }
-
private void UpdateChartLegendView()
{
if (ChartLegendView == null)
@@ -261,33 +247,5 @@
ChartLegendView.Data = null;
}
}
-
- private void Subscribe()
- {
- var compositeView = Gui.DocumentViews.ActiveView as ICompositeView;
- if (compositeView != null)
- {
- compositeView.ChildViews.CollectionChanged += ChildViewsCollectionChanged;
- }
- }
-
- private void Unsubscribe()
- {
- var compositeView = Gui.DocumentViews.ActiveView as ICompositeView;
- if (compositeView != null)
- {
- compositeView.ChildViews.CollectionChanged -= ChildViewsCollectionChanged;
- }
- }
-
- private void ChildViewsCollectionChanged(object sender, NotifyCollectionChangingEventArgs e)
- {
- if (!(e.Item is ChartView))
- {
- return;
- }
-
- UpdateChartLegendView();
- }
}
}
\ No newline at end of file
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapView.cs
===================================================================
diff -u -rc3dd2497d527a0d8f1e7d974f601903d2e426331 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapView.cs (.../MapView.cs) (revision c3dd2497d527a0d8f1e7d974f601903d2e426331)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapView.cs (.../MapView.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -22,7 +22,7 @@
namespace Core.Plugins.SharpMapGis.Gui.Forms
{
- public partial class MapView : UserControl, ICompositeView
+ public partial class MapView : UserControl, IView
{
private bool canAddPoint = true;
private bool canDeleteItem = true;
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/IGuiMapViewExtentions.cs
===================================================================
diff -u -r0c09106be1dfa0dad80232e39fea48b274ecdf37 -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/IGuiMapViewExtentions.cs (.../IGuiMapViewExtentions.cs) (revision 0c09106be1dfa0dad80232e39fea48b274ecdf37)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/IGuiMapViewExtentions.cs (.../IGuiMapViewExtentions.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
using Core.Common.Gui;
using Core.Plugins.SharpMapGis.Gui.Forms;
@@ -27,18 +26,6 @@
{
yield return mapView;
}
-
- var compositeView = view as ICompositeView;
- if (compositeView != null)
- {
- foreach (var childView in compositeView.ChildViews)
- {
- foreach (var compositeMapView in GetMapViews(childView))
- {
- yield return compositeMapView;
- }
- }
- }
}
}
}
\ No newline at end of file
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs
===================================================================
diff -u -r65c12731b5bc4f7dd185b779c801b9ee319e4e3a -r0d8098264ea05ccbf529b3c2c54479fdbc0ef670
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs (.../SharpMapGisGuiPlugin.cs) (revision 65c12731b5bc4f7dd185b779c801b9ee319e4e3a)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs (.../SharpMapGisGuiPlugin.cs) (revision 0d8098264ea05ccbf529b3c2c54479fdbc0ef670)
@@ -141,7 +141,6 @@
gui.SelectionChanged += GuiSelectionChanged;
gui.DocumentViews.ActiveViewChanged += DocumentViewsActiveViewChanged;
- gui.DocumentViews.ChildViewChanged += DocumentViewsActiveViewChanged;
gui.ProjectClosing += ApplicationProjectClosing;
}
@@ -153,7 +152,6 @@
var documentViews = gui.DocumentViews;
if (documentViews != null)
{
- documentViews.ChildViewChanged -= DocumentViewsActiveViewChanged;
documentViews.ActiveViewChanged -= DocumentViewsActiveViewChanged;
}
gui.ProjectClosing -= ApplicationProjectClosing;