forked from mia/Aegisub
Release mouse capture from the visual tools when the zoom is changed
This commit is contained in:
parent
e9a949954f
commit
e7306ae642
2 changed files with 4 additions and 7 deletions
|
@ -52,8 +52,6 @@ VisualToolBase::VisualToolBase(VideoDisplay *parent, agi::Context *context)
|
||||||
, active_line(0)
|
, active_line(0)
|
||||||
, dragging(false)
|
, dragging(false)
|
||||||
, frame_number(c->videoController->GetFrameN())
|
, frame_number(c->videoController->GetFrameN())
|
||||||
, left_click(false)
|
|
||||||
, left_double(false)
|
|
||||||
, shift_down(false)
|
, shift_down(false)
|
||||||
, ctrl_down(false)
|
, ctrl_down(false)
|
||||||
, alt_down(false)
|
, alt_down(false)
|
||||||
|
@ -103,7 +101,6 @@ void VisualToolBase::OnSeek(int new_frame) {
|
||||||
void VisualToolBase::OnMouseCaptureLost(wxMouseCaptureLostEvent &) {
|
void VisualToolBase::OnMouseCaptureLost(wxMouseCaptureLostEvent &) {
|
||||||
holding = false;
|
holding = false;
|
||||||
dragging = false;
|
dragging = false;
|
||||||
left_click = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualToolBase::OnActiveLineChanged(AssDialogue *new_line) {
|
void VisualToolBase::OnActiveLineChanged(AssDialogue *new_line) {
|
||||||
|
@ -151,6 +148,8 @@ void VisualToolBase::SetDisplayArea(int x, int y, int w, int h) {
|
||||||
|
|
||||||
holding = false;
|
holding = false;
|
||||||
dragging = false;
|
dragging = false;
|
||||||
|
if (parent->HasCapture())
|
||||||
|
parent->ReleaseMouse();
|
||||||
OnCoordinateSystemsChanged();
|
OnCoordinateSystemsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,8 +171,8 @@ VisualTool<FeatureType>::VisualTool(VideoDisplay *parent, agi::Context *context)
|
||||||
|
|
||||||
template<class FeatureType>
|
template<class FeatureType>
|
||||||
void VisualTool<FeatureType>::OnMouseEvent(wxMouseEvent &event) {
|
void VisualTool<FeatureType>::OnMouseEvent(wxMouseEvent &event) {
|
||||||
left_click = event.LeftDown();
|
bool left_click = event.LeftDown();
|
||||||
left_double = event.LeftDClick();
|
bool left_double = event.LeftDClick();
|
||||||
shift_down = event.ShiftDown();
|
shift_down = event.ShiftDown();
|
||||||
ctrl_down = event.CmdDown();
|
ctrl_down = event.CmdDown();
|
||||||
alt_down = event.AltDown();
|
alt_down = event.AltDown();
|
||||||
|
|
|
@ -103,8 +103,6 @@ protected:
|
||||||
|
|
||||||
int frame_number; ///< Current frame number
|
int frame_number; ///< Current frame number
|
||||||
|
|
||||||
bool left_click; ///< Is a left click event currently being processed?
|
|
||||||
bool left_double; ///< Is a left double click event currently being processed?
|
|
||||||
bool shift_down; ///< Is shift down?
|
bool shift_down; ///< Is shift down?
|
||||||
bool ctrl_down; ///< Is ctrl down?
|
bool ctrl_down; ///< Is ctrl down?
|
||||||
bool alt_down; ///< Is alt down?
|
bool alt_down; ///< Is alt down?
|
||||||
|
|
Loading…
Reference in a new issue