diff --git a/src/add-ons/translators/tiff/TIFFView.cpp b/src/add-ons/translators/tiff/TIFFView.cpp index 5e880fbc85..3a285fec73 100644 --- a/src/add-ons/translators/tiff/TIFFView.cpp +++ b/src/add-ons/translators/tiff/TIFFView.cpp @@ -120,8 +120,7 @@ TIFFView::TIFFView(const char* name, uint32 flags, // TODO ? - strip encoding is not implemented in libTIFF for this compression // add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression); - fCompressionMF = new BMenuField("compression", - B_TRANSLATE("Use compression:"), menu); + fCompressionMF = new BMenuField(B_TRANSLATE("Use compression:"), menu); // Build the layout BLayoutBuilder::Group<>(this, B_VERTICAL, 7) @@ -159,6 +158,7 @@ TIFFView::AllAttached() fCompressionMF->Menu()->SetTargetForItems(this); fCompressionMF->SetDivider( fCompressionMF->StringWidth(fCompressionMF->Label()) + 3); + fCompressionMF->ResizeToPreferred(); } @@ -172,22 +172,9 @@ TIFFView::MessageReceived(BMessage* message) fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION, &value); fSettings->SaveSettings(); } - fCompressionMF->ResizeToPreferred(); break; } default: BView::MessageReceived(message); } } - - -void -TIFFView::WindowActivated(bool active) -{ - static bool firstRun = true; - - if (firstRun) { - firstRun = false; - fCompressionMF->ResizeToPreferred(); - } -} diff --git a/src/add-ons/translators/tiff/TIFFView.h b/src/add-ons/translators/tiff/TIFFView.h index e9bbd48478..69754feaf5 100644 --- a/src/add-ons/translators/tiff/TIFFView.h +++ b/src/add-ons/translators/tiff/TIFFView.h @@ -48,7 +48,6 @@ public: virtual void AllAttached(); virtual void MessageReceived(BMessage* message); - virtual void WindowActivated(bool active); enum { MSG_COMPRESSION_CHANGED = 'cmch',