Skip to content

Commit

Permalink
fixed BrowserDialog reuse
Browse files Browse the repository at this point in the history
defined bezel help links
  • Loading branch information
thrust26 committed Aug 27, 2023
1 parent bd778e3 commit 21879be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3789,7 +3789,7 @@ <h2><b><a name="Options">Changing Options</a></b></h2>
</table>
<br>

<p><b>Video & Audio Settings</b> dialog <a name="VideoAudioEffects">(Bezels)</a>:</p>
<p><b>Video & Audio Settings</b> dialog <a name="VideoAudioBezels">(Bezels)</a>:</p>
<table style="border:hidden">
<tr>
<td valign="top"><img src="graphics/options_bezels.png"></td>
Expand Down
6 changes: 4 additions & 2 deletions src/gui/BrowserDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ void BrowserDialog::show(GuiObject* parent, const GUI::Font& font,
if(w > static_cast<uInt32>(font.getMaxCharWidth() * 80))
w = font.getMaxCharWidth() * 80;

if(ourBrowser == nullptr || &ourBrowser->parent() != &parent->parent())
if(ourBrowser == nullptr || &ourBrowser->parent() != &parent->parent()
|| ourBrowser->_w > static_cast<int>(w) || ourBrowser->_h > static_cast<int>(h))
{
ourBrowser = make_unique<BrowserDialog>(parent, font, w, h);

}
ourBrowser->setTitle(title); // has to be always updated!
ourBrowser->show(startpath, mode, command, namefilter);
}
Expand Down
12 changes: 6 additions & 6 deletions src/gui/VideoAudioDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void VideoAudioDialog::addPaletteTab()
addPalette(xpos, VBORDER, _w - 2 * 2 - HBORDER - xpos,
myTVGamma->getBottom() - myTIAPalette->getTop());

// Add items for tab 2
// Add items for tab 1
addToFocusList(wid, myTab, tabID);

myTab->parentWidget(tabID)->setHelpAnchor("VideoAudioPalettes");
Expand Down Expand Up @@ -434,7 +434,7 @@ void VideoAudioDialog::addTVEffectsTab()
CREATE_CLONE_BUTTON(Bad, "Clone Bad adjust")
CREATE_CLONE_BUTTON(Custom, "Revert")

// Add items for tab 3
// Add items for tab 2
addToFocusList(wid, myTab, tabID);

myTab->parentWidget(tabID)->setHelpAnchor("VideoAudioEffects");
Expand Down Expand Up @@ -526,10 +526,10 @@ void VideoAudioDialog::addBezelTab()
myBezelWinRounded->setToolTip("Enable if the bezel window has rounded borders");
wid.push_back(myBezelWinRounded);

// Add items for tab 4
// Add items for tab 3
addToFocusList(wid, myTab, tabID);

myTab->parentWidget(tabID)->setHelpAnchor("TODO???");
myTab->parentWidget(tabID)->setHelpAnchor("VideoAudioBezels");
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down Expand Up @@ -657,7 +657,7 @@ void VideoAudioDialog::addAudioTab()
myDpcPitch->setTickmarkIntervals(2);
wid.push_back(myDpcPitch);

// Add items for tab 5
// Add items for tab 4
addToFocusList(wid, myTab, tabID);

myTab->parentWidget(tabID)->setHelpAnchor("VideoAudioAudio");
Expand Down Expand Up @@ -1242,7 +1242,7 @@ void VideoAudioDialog::handleBezelChange()

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void VideoAudioDialog::handleCommand(CommandSender* sender, int cmd,
int data, int id)
int data, int id)
{
switch (cmd)
{
Expand Down

0 comments on commit 21879be

Please sign in to comment.