mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Bug 2571 - Linux: No digit highlight in Edit Label time / frequency controls
This commit is contained in:
parent
77f3cc5506
commit
9940f1cf64
@ -1829,7 +1829,16 @@ void LabelTrackView::ShowContextMenu( AudacityProject &project )
|
|||||||
wxASSERT(success);
|
wxASSERT(success);
|
||||||
static_cast<void>(success); // Suppress unused variable warning if debug mode is disabled
|
static_cast<void>(success); // Suppress unused variable warning if debug mode is disabled
|
||||||
|
|
||||||
|
// Bug #2571: Hackage alert! For some reason wxGTK does not like
|
||||||
|
// displaying the LabelDialog from within the PopupMenu "context".
|
||||||
|
// So, workaround it by editing the label AFTER the popup menu is
|
||||||
|
// closed. It's really ugly, but it works. :-(
|
||||||
|
mEditIndex = -1;
|
||||||
parent->PopupMenu(&menu, x, ls->y + (mIconHeight / 2) - 1);
|
parent->PopupMenu(&menu, x, ls->y + (mIconHeight / 2) - 1);
|
||||||
|
if (mEditIndex >= 0)
|
||||||
|
{
|
||||||
|
DoEditLabels( project, FindLabelTrack().get(), mEditIndex );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1881,9 +1890,8 @@ void LabelTrackView::OnContextMenu(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OnEditSelectedLabelID: {
|
case OnEditSelectedLabelID: {
|
||||||
int ndx = GetLabelIndex(selectedRegion.t0(), selectedRegion.t1());
|
// Bug #2571: See above
|
||||||
if (ndx != -1)
|
mEditIndex = GetLabelIndex(selectedRegion.t0(), selectedRegion.t1());
|
||||||
DoEditLabels( project, FindLabelTrack().get(), ndx );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -252,6 +252,9 @@ private:
|
|||||||
std::weak_ptr<LabelTextHandle> mTextHandle;
|
std::weak_ptr<LabelTextHandle> mTextHandle;
|
||||||
|
|
||||||
static wxFont msFont;
|
static wxFont msFont;
|
||||||
|
|
||||||
|
// Bug #2571: See explanation in ShowContextMenu()
|
||||||
|
int mEditIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user