mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Merge pull request #1198 from MineGame159/remember_string_find_class
[IDE] Find class dialog and open file in workspace dialog now remembers last searched string
This commit is contained in:
commit
a8546fbbdf
2 changed files with 20 additions and 1 deletions
|
@ -13,6 +13,8 @@ namespace IDE.ui
|
|||
{
|
||||
class ClassViewPanel : Panel
|
||||
{
|
||||
private static String sLastSearchString = new String() ~ delete _;
|
||||
|
||||
public class ClassViewListViewItem : IDEListViewItem
|
||||
{
|
||||
public float mLabelOffset;
|
||||
|
@ -407,6 +409,15 @@ namespace IDE.ui
|
|||
{
|
||||
mWantsSubmit = true;
|
||||
});
|
||||
|
||||
mSearchEdit.SetText(sLastSearchString);
|
||||
mSearchEdit.Content.SelectAll();
|
||||
|
||||
findClassDialog.mOnClosed.Add(new () =>
|
||||
{
|
||||
sLastSearchString.Clear();
|
||||
mSearchEdit.GetText(sLastSearchString);
|
||||
});
|
||||
}
|
||||
|
||||
//mListView.mDragEndHandler.Add(new => HandleDragEnd);
|
||||
|
|
|
@ -64,6 +64,8 @@ namespace IDE.ui
|
|||
public bool mFilterChanged;
|
||||
public volatile bool mExitingThread;
|
||||
public Thread mDateThread;
|
||||
|
||||
static String sLastSearchString = new String() ~ delete _;
|
||||
|
||||
public this()
|
||||
{
|
||||
|
@ -91,9 +93,15 @@ namespace IDE.ui
|
|||
AddWidget(mFileList);
|
||||
mTabWidgets.Add(mFileList);
|
||||
|
||||
mEditWidget = AddEdit("");
|
||||
mEditWidget = AddEdit(sLastSearchString);
|
||||
mEditWidget.mOnKeyDown.Add(new => EditKeyDownHandler);
|
||||
mEditWidget.mOnContentChanged.Add(new (evt) => { mFilterChanged = true; });
|
||||
|
||||
mOnClosed.Add(new () =>
|
||||
{
|
||||
sLastSearchString.Clear();
|
||||
mEditWidget.GetText(sLastSearchString);
|
||||
});
|
||||
}
|
||||
|
||||
void ShutdownThread()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue