mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52: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
|
class ClassViewPanel : Panel
|
||||||
{
|
{
|
||||||
|
private static String sLastSearchString = new String() ~ delete _;
|
||||||
|
|
||||||
public class ClassViewListViewItem : IDEListViewItem
|
public class ClassViewListViewItem : IDEListViewItem
|
||||||
{
|
{
|
||||||
public float mLabelOffset;
|
public float mLabelOffset;
|
||||||
|
@ -407,6 +409,15 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
mWantsSubmit = true;
|
mWantsSubmit = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mSearchEdit.SetText(sLastSearchString);
|
||||||
|
mSearchEdit.Content.SelectAll();
|
||||||
|
|
||||||
|
findClassDialog.mOnClosed.Add(new () =>
|
||||||
|
{
|
||||||
|
sLastSearchString.Clear();
|
||||||
|
mSearchEdit.GetText(sLastSearchString);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//mListView.mDragEndHandler.Add(new => HandleDragEnd);
|
//mListView.mDragEndHandler.Add(new => HandleDragEnd);
|
||||||
|
|
|
@ -64,6 +64,8 @@ namespace IDE.ui
|
||||||
public bool mFilterChanged;
|
public bool mFilterChanged;
|
||||||
public volatile bool mExitingThread;
|
public volatile bool mExitingThread;
|
||||||
public Thread mDateThread;
|
public Thread mDateThread;
|
||||||
|
|
||||||
|
static String sLastSearchString = new String() ~ delete _;
|
||||||
|
|
||||||
public this()
|
public this()
|
||||||
{
|
{
|
||||||
|
@ -91,9 +93,15 @@ namespace IDE.ui
|
||||||
AddWidget(mFileList);
|
AddWidget(mFileList);
|
||||||
mTabWidgets.Add(mFileList);
|
mTabWidgets.Add(mFileList);
|
||||||
|
|
||||||
mEditWidget = AddEdit("");
|
mEditWidget = AddEdit(sLastSearchString);
|
||||||
mEditWidget.mOnKeyDown.Add(new => EditKeyDownHandler);
|
mEditWidget.mOnKeyDown.Add(new => EditKeyDownHandler);
|
||||||
mEditWidget.mOnContentChanged.Add(new (evt) => { mFilterChanged = true; });
|
mEditWidget.mOnContentChanged.Add(new (evt) => { mFilterChanged = true; });
|
||||||
|
|
||||||
|
mOnClosed.Add(new () =>
|
||||||
|
{
|
||||||
|
sLastSearchString.Clear();
|
||||||
|
mEditWidget.GetText(sLastSearchString);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShutdownThread()
|
void ShutdownThread()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue