FMXComponents icon indicating copy to clipboard operation
FMXComponents copied to clipboard

TFMXImageSlider.Clear handles ActivePage incorrectly

Open vkrapotkin opened this issue 5 years ago • 0 comments

procedure TFMXImageSlider.Clear;
...
  ActivePage := -1;

it will never be executed because

procedure TFMXImageSlider.SetActivePage(const Value: Integer);
...
  if (Value < 0) or (Value > FPages.Count - 1) then // check if value valid
    exit;

It prevents to set ActivePage=0 after clearing and reloading.

so we have to replace ActivePage := -1; to FActivePage := -1;

vkrapotkin avatar Sep 02 '19 10:09 vkrapotkin