Changeset 74


Ignore:
Timestamp:
Aug 2, 2016, 12:27:13 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Wrong column indexes in list of import sources.
  • Fixed: Do not sort items in TListSort component if soNone order is set.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormImportSources.pas

    r73 r74  
    274274           if Pos(UTF8LowerCase(StringGrid.Cells[2, 0]),
    275275             UTF8LowerCase(TImportSource(List.Items[I]).Categories.GetString)) > 0 then Inc(FoundCount);
    276            if Pos(UTF8LowerCase(StringGrid.Cells[2, 0]),
     276           if Pos(UTF8LowerCase(StringGrid.Cells[3, 0]),
    277277             UTF8LowerCase(IntToStr(TImportSource(List.Items[I]).ItemCount))) > 0 then Inc(FoundCount);
    278            if Pos(UTF8LowerCase(StringGrid.Cells[2, 0]),
     278           if Pos(UTF8LowerCase(StringGrid.Cells[4, 0]),
    279279             UTF8LowerCase(DateTimeToStr(TImportSource(List.Items[I]).LastImportTime))) > 0 then Inc(FoundCount);
    280280           if FoundCount <> EnteredCount then List.Delete(I);
  • trunk/Forms/UFormMain.lfm

    r73 r74  
    14301430    OnCompareItem = ListViewSort1CompareItem
    14311431    OnFilter = ListViewSort1Filter
    1432     Column = 2
     1432    Column = 0
    14331433    Order = soUp
    14341434    left = 472
  • trunk/Forms/UFormMain.pas

    r73 r74  
    426426procedure TFormMain.ListViewSort1Filter(ListViewSort: TListViewSort);
    427427begin
    428   AcronymDb.Acronyms.Sort(AcronymComparer);
    429428  AcronymDb.AssignToList(ListViewSort1.List);
    430429  FilterList(ListViewSort1.List);
  • trunk/Packages/Common/UListViewSort.pas

    r17 r74  
    209209  if ListView.Items.Count <> List.Count then
    210210    ListView.Items.Count := List.Count;
    211   if Assigned(FOnCompareItem) then Sort(FOnCompareItem);
     211  if Assigned(FOnCompareItem) and (Order <> soNone) then Sort(FOnCompareItem);
    212212  //ListView.Items[-1]; // Workaround for not show first row if selected
    213213  ListView.Refresh;
Note: See TracChangeset for help on using the changeset viewer.