fixed erroneous deleting of print settings BMessage and changed fMenuBar to fFontMenu to fix crashing in font settings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2172 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -49,8 +49,8 @@ StyledEditWindow::~StyledEditWindow()
|
|||||||
{
|
{
|
||||||
if (fSaveMessage)
|
if (fSaveMessage)
|
||||||
delete fSaveMessage;
|
delete fSaveMessage;
|
||||||
if (fPrintSettings)
|
// if (fPrintSettings)
|
||||||
delete fPrintSettings;
|
// delete fPrintSettings;
|
||||||
|
|
||||||
delete fSavePanel;
|
delete fSavePanel;
|
||||||
} /***~StyledEditWindow()***/
|
} /***~StyledEditWindow()***/
|
||||||
@@ -984,7 +984,7 @@ StyledEditWindow::PageSetup(const char *documentname)
|
|||||||
result= printJob.ConfigPage();
|
result= printJob.ConfigPage();
|
||||||
|
|
||||||
if (result== B_NO_ERROR){
|
if (result== B_NO_ERROR){
|
||||||
delete fPrintSettings;
|
// delete fPrintSettings;
|
||||||
fPrintSettings= printJob.Settings();
|
fPrintSettings= printJob.Settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1243,7 +1243,7 @@ StyledEditWindow::SetFontStyle(const char *fontFamily, const char *fontStyle)
|
|||||||
|
|
||||||
// clear that family's bit on the menu, if necessary
|
// clear that family's bit on the menu, if necessary
|
||||||
if (strcmp(oldFamily,fontFamily)) {
|
if (strcmp(oldFamily,fontFamily)) {
|
||||||
BMenuItem * oldItem = fMenuBar->FindItem(oldFamily);
|
BMenuItem * oldItem = fFontMenu->FindItem(oldFamily);
|
||||||
if (oldItem != 0) {
|
if (oldItem != 0) {
|
||||||
oldItem->SetMarked(false);
|
oldItem->SetMarked(false);
|
||||||
}
|
}
|
||||||
@@ -1253,7 +1253,7 @@ StyledEditWindow::SetFontStyle(const char *fontFamily, const char *fontStyle)
|
|||||||
fTextView->SetFontAndColor(&font);
|
fTextView->SetFontAndColor(&font);
|
||||||
|
|
||||||
BMenuItem * superItem;
|
BMenuItem * superItem;
|
||||||
superItem = fMenuBar->FindItem(fontFamily);
|
superItem = fFontMenu->FindItem(fontFamily);
|
||||||
if (superItem != 0) {
|
if (superItem != 0) {
|
||||||
superItem->SetMarked(true);
|
superItem->SetMarked(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user