projects
/
goodguy
/
cinelerra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3edaf1
)
fix for vframe get_temp blunder, vicon zoom tweak
author
Good Guy
<good1.2guy@gmail.com>
Fri, 7 Dec 2018 19:13:11 +0000
(12:13 -0700)
committer
Good Guy
<good1.2guy@gmail.com>
Fri, 7 Dec 2018 19:13:11 +0000
(12:13 -0700)
cinelerra-5.1/cinelerra/awindowgui.C
patch
|
blob
|
history
cinelerra-5.1/guicast/vframe.C
patch
|
blob
|
history
cinelerra-5.1/guicast/vicon.C
patch
|
blob
|
history
cinelerra-5.1/guicast/vicon.h
patch
|
blob
|
history
diff --git
a/cinelerra-5.1/cinelerra/awindowgui.C
b/cinelerra-5.1/cinelerra/awindowgui.C
index 072f878e80fd933c8bb4dcb88503763c13f691a0..b370b2c3f542ac048996b144e6dbd890cc854410 100644
(file)
--- a/
cinelerra-5.1/cinelerra/awindowgui.C
+++ b/
cinelerra-5.1/cinelerra/awindowgui.C
@@
-331,7
+331,7
@@
int AssetViewPopup::button_press_event()
int dir = 1, button = get_buttonpress();
switch( button ) {
case WHEEL_DOWN: dir = -1; // fall thru
int dir = 1, button = get_buttonpress();
switch( button ) {
case WHEEL_DOWN: dir = -1; // fall thru
- case WHEEL_UP: return zoom_scale(dir);
+ case WHEEL_UP: return
avt->
zoom_scale(dir);
case LEFT_BUTTON:
break;
default:
case LEFT_BUTTON:
break;
default:
@@
-2570,7
+2570,7
@@
int AWindowAssets::button_press_event()
case WHEEL_UP: {
int x = get_cursor_x(), y = get_cursor_y();
if( avt->cursor_inside(x, y) && avt->view_win )
case WHEEL_UP: {
int x = get_cursor_x(), y = get_cursor_y();
if( avt->cursor_inside(x, y) && avt->view_win )
- return avt->
view_win->
zoom_scale(dir);
+ return avt->zoom_scale(dir);
return 1; }
}
}
return 1; }
}
}
diff --git
a/cinelerra-5.1/guicast/vframe.C
b/cinelerra-5.1/guicast/vframe.C
index 76d6ae1d0e024521626e5143ab75a0ab9b5dfe8f..63c36f06b4ee0d86c914e82a267a0c133bc17d70 100644
(file)
--- a/
cinelerra-5.1/guicast/vframe.C
+++ b/
cinelerra-5.1/guicast/vframe.C
@@
-390,7
+390,8
@@
int VFrame::get_keyframe()
void VFrame::get_temp(VFrame *&vfrm, int w, int h, int color_model)
{
void VFrame::get_temp(VFrame *&vfrm, int w, int h, int color_model)
{
- if( vfrm && ( vfrm->get_w() != w || vfrm->get_h() != h ) ) {
+ if( vfrm && ( vfrm->color_model != color_model ||
+ vfrm->get_w() != w || vfrm->get_h() != h ) ) {
delete vfrm; vfrm = 0;
}
if( !vfrm ) vfrm = new VFrame(w, h, color_model, 0);
delete vfrm; vfrm = 0;
}
if( !vfrm ) vfrm = new VFrame(w, h, color_model, 0);
diff --git
a/cinelerra-5.1/guicast/vicon.C
b/cinelerra-5.1/guicast/vicon.C
index dbee56da45adb7e043f27a97d70b9682d04e93be..f27791f94c06767bd12f0fc318093e2842319685 100644
(file)
--- a/
cinelerra-5.1/guicast/vicon.C
+++ b/
cinelerra-5.1/guicast/vicon.C
@@
-220,16
+220,6
@@
ViewPopup *VIconThread::new_view_window()
return vwin;
}
return vwin;
}
-int ViewPopup::zoom_scale(int dir)
-{
- int view_h = vt->view_h + dir*vt->view_h/10 + dir;
- bclamp(view_h, 16,512);
- vt->view_h = view_h;
- vt->view_w = view_h * vt->vw/vt->vh;
- vt->stop_viewing();
- return 1;
-}
-
void VIconThread::
reset_images()
void VIconThread::
reset_images()
@@
-289,6
+279,17
@@
update_view()
return 1;
}
return 1;
}
+int VIconThread::zoom_scale(int dir)
+{
+ int view_h = this->view_h;
+ view_h += dir*view_h/10 + dir;
+ bclamp(view_h, 16,512);
+ this->view_h = view_h;
+ this->view_w = view_h * vw/vh;
+ stop_viewing();
+ return 1;
+}
+
void VIconThread::
draw_images()
void VIconThread::
draw_images()
diff --git
a/cinelerra-5.1/guicast/vicon.h
b/cinelerra-5.1/guicast/vicon.h
index dc4963b99447ac801562084fd12e9ebea9b9d6bb..544e1f963031db6e20b85a0a105547821e82569c 100644
(file)
--- a/
cinelerra-5.1/guicast/vicon.h
+++ b/
cinelerra-5.1/guicast/vicon.h
@@
-17,7
+17,6
@@
public:
virtual int button_release_event() { return 0; }
virtual int cursor_motion_event() { return 0; }
virtual void draw_vframe(VFrame *frame);
virtual int button_release_event() { return 0; }
virtual int cursor_motion_event() { return 0; }
virtual void draw_vframe(VFrame *frame);
- int zoom_scale(int dir);
ViewPopup(VIconThread *vt, int x, int y, int w, int h);
~ViewPopup();
ViewPopup(VIconThread *vt, int x, int y, int w, int h);
~ViewPopup();
@@
-103,6
+102,7
@@
public:
int cursor_inside(int x, int y);
void set_drawing_area(int x0, int y0, int x1, int y1);
void set_view_popup(VIcon *vicon);
int cursor_inside(int x, int y);
void set_drawing_area(int x0, int y0, int x1, int y1);
void set_view_popup(VIcon *vicon);
+ int zoom_scale(int dir);
void close_view_popup();
void hide_vicons(int v=1);
virtual ViewPopup *new_view_window();
void close_view_popup();
void hide_vicons(int v=1);
virtual ViewPopup *new_view_window();