* Restricted the cursor position/selection restoration to the formula mode for

stored queries - it's usually more annoying than helpful for the other modes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2011-02-09 19:20:34 +00:00
parent 37d898f0b6
commit e0971ab8f6
+4 -3
View File
@@ -2242,11 +2242,12 @@ FindPanel::RestoreWindowState(const BNode *node)
BString focusedView;
if (node->ReadAttrString("_trk/focusedView", &focusedView) == B_OK) {
BView *view = FindView(focusedView.String());
if (view) {
if (view != NULL) {
view->MakeFocus();
BTextControl *textControl = dynamic_cast<BTextControl *>(view);
if (textControl) {
int32 selStart = 0, selEnd = LONG_MAX;
if (textControl != NULL && Mode() == kByFormulaItem) {
int32 selStart = 0;
int32 selEnd = LONG_MAX;
node->ReadAttr("_trk/focusedSelStart", B_INT32_TYPE, 0,
&selStart, sizeof(selStart));
node->ReadAttr("_trk/focusedSelEnd", B_INT32_TYPE, 0,