Skip to content

Commit

Permalink
[UI] Columns header context menu is hidden being the standard menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Oct 8, 2020
1 parent 337d15f commit b261ca6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions Analogy/CommonChangeLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static IEnumerable<AnalogyChangeLog> GetChangeLog()
{
return new List<AnalogyChangeLog>
{
new AnalogyChangeLog("V4.2.10 - [UI] Columns header context menu is hidden being the standard menu #545",AnalogChangeLogType.Bug,"Lior Banai",new DateTime(2020,10,08)),
new AnalogyChangeLog("V4.2.10 - [Extendability] Allows shuffling of provider between factories #534",AnalogChangeLogType.Improvement,"Lior Banai",new DateTime(2020,10,06)),
new AnalogyChangeLog("V4.2.10 - [UI] add setting to toggle compact ribbon view #520",AnalogChangeLogType.Improvement,"Lior Banai",new DateTime(2020,10,02)),
new AnalogyChangeLog("V4.2.9 - [UI] Analogy Save message still says XML format while it has been deprecated and replaced by Json #514",AnalogChangeLogType.Bug,"Lior Banai",new DateTime(2020,09,24)),
Expand Down
15 changes: 8 additions & 7 deletions Analogy/UserControls/UCLogs.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using Analogy.DataSources;
using Analogy.Interfaces;
using Analogy.Interfaces.DataTypes;
using Analogy.Managers;
using Analogy.Tools;
using Analogy.Types;
using DevExpress.Data;
using DevExpress.Data.Filtering;
using DevExpress.Utils;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
Expand All @@ -24,9 +27,6 @@
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Analogy.Interfaces.DataTypes;
using Analogy.Tools;
using DevExpress.XtraEditors.Controls;

namespace Analogy
{
Expand Down Expand Up @@ -527,7 +527,7 @@ private void LogGrid_MouseDown(object sender, MouseEventArgs e)
{
GridView view = sender as GridView;
GridHitInfo hitInfo = view.CalcHitInfo(e.Location);
if (hitInfo.InRow && !(hitInfo.Column == view.FocusedColumn && hitInfo.RowHandle == view.FocusedRowHandle))
if (hitInfo.InRow && hitInfo.RowHandle >= 0 && !(hitInfo.Column == view.FocusedColumn && hitInfo.RowHandle == view.FocusedRowHandle))
{
UpdatePopupTexts();
var value = view.GetRowCellValue(hitInfo.RowHandle, hitInfo.Column.FieldName);
Expand Down Expand Up @@ -574,9 +574,10 @@ private void UpdatePopupTexts()

private void LogGrid_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
GridHitInfo hitInfo = logGrid.CalcHitInfo(e.Location);
if (e.Button == MouseButtons.Right && !hitInfo.InColumnPanel)
{
LogGridPopupMenu.ShowPopup(Cursor.Position);
LogGridPopupMenu.ShowPopup(Cursor.Position);
}
}
private void LoadReplacementHeaders()
Expand Down Expand Up @@ -2503,7 +2504,7 @@ private void tsmiDecreaseFont_Click(object sender, EventArgs e)
{
if (LogGrid.Appearance.Row.Font.Size < 5) return;
{
var fontSize= Settings.FontSettings.GridFontSize = LogGrid.Appearance.Row.Font.Size - 2;
var fontSize = Settings.FontSettings.GridFontSize = LogGrid.Appearance.Row.Font.Size - 2;
LogGrid.Appearance.Row.Font = new Font(LogGrid.Appearance.Row.Font.Name, fontSize);
gridViewBookmarkedMessages.Appearance.Row.Font = new Font(LogGrid.Appearance.Row.Font.Name, fontSize);
SaveGridLayout();
Expand Down

0 comments on commit b261ca6

Please sign in to comment.