What steps will reproduce the problem?
1. Open data Browser
2. open find item dialog
3. click the plus
4. click the Minus
5. repeat
What is the expected output/behaviour? What do you see instead?
Should add /remove another search line, Adding works fine but removing will
eventually cause the buttons under it to move up too high.
What version are you using? On what operating system?
newest version however the bug has been around for ever.
Please provide any additional information below.
Fix for it is to change the RemoveButton_Click function in ItemFindDialog.cs as
follows
Old version :
private void RemoveButton_Click(object sender, System.EventArgs e) {
Button B = sender as Button;
if (B == null)
return;
ItemPredicate IP = B.Tag as ItemPredicate;
if (IP != null) {
int idx = this.Predicates_.IndexOf(IP);
this.pnlSearchOptions.Controls.Remove(IP);
this.pnlSearchOptions.Controls.Remove(B);
this.Predicates_.Remove(IP);
for (int i = idx; i < this.Predicates_.Count; ++i) {
ItemPredicate LowerIP = this.Predicates_[i];
LowerIP.Top -= 3 + IP.Height;
Button LowerButton = LowerIP.Tag as Button;
if (LowerButton != null)
LowerButton.Top -= 3 + IP.Height;
}
this.pnlSearchOptions.Height -= 3 + IP.Height;
}
}
New Version :
private void RemoveButton_Click(object sender, System.EventArgs e) {
Button B = sender as Button;
if (B == null)
return;
ItemPredicate IP = B.Tag as ItemPredicate;
if (IP != null) {
int idx = this.Predicates_.IndexOf(IP);
this.pnlSearchOptions.Controls.Remove(IP);
this.pnlSearchOptions.Controls.Remove(B);
this.Predicates_.Remove(IP);
for (int i = idx; i < this.Predicates_.Count; ++i) {
ItemPredicate LowerIP = this.Predicates_[i];
LowerIP.Top -= IP.Height;
Button LowerButton = LowerIP.Tag as Button;
if (LowerButton != null)
LowerButton.Top -= IP.Height;
}
this.pnlSearchOptions.Height -= IP.Height;
}
}
just removed the 3 that was being added to IP.Height
Original issue reported on code.google.com by Deral...@gmail.com on 21 Sep 2012 at 6:07
Original issue reported on code.google.com by
Deral...@gmail.com
on 21 Sep 2012 at 6:07