use BFilePanel::SetSaveText which selects the filename

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty
2004-04-02 02:08:34 +00:00
parent f733cb88d8
commit 9a9f64e114
3 changed files with 1 additions and 17 deletions
+1 -9
View File
@@ -902,8 +902,6 @@ StyledEditWindow::SaveAs(BMessage *message)
}
fSavePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(this), directory, B_FILE_NODE, false);
fSavePanelTextView =
dynamic_cast<BTextControl*>(fSavePanel->Window()->FindView("text view"));
BMenuBar * menuBar =
dynamic_cast<BMenuBar*>(fSavePanel->Window()->FindView("MenuBar"));
@@ -930,13 +928,7 @@ StyledEditWindow::SaveAs(BMessage *message)
}
}
// its own scope allows the lock to be released before Show()
{
BAutolock lock(fSavePanel->Window());
if (lock.IsLocked()) {
fSavePanelTextView->SetText(Title());
}
}
fSavePanel->SetSaveText(Title());
if (message != 0) {
fSavePanel->SetMessage(message);
}