projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove asset while preview active segv fix, guard against segv with missing asset...
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
awindowgui.C
diff --git
a/cinelerra-5.1/cinelerra/awindowgui.C
b/cinelerra-5.1/cinelerra/awindowgui.C
index 5756453c95909b92be6acaba48078e253e95d626..45954b76ca596053cc8a886aa714d56b708d2418 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:
@@
-547,10
+547,22
@@
AssetVIconThread::AssetVIconThread(AWindowGUI *gui, Preferences *preferences)
case VICON_COLOR_MODE_HIGH: vicon_cmodel = BC_RGB888; break;
}
this->vicon_cmodel = vicon_cmodel;
case VICON_COLOR_MODE_HIGH: vicon_cmodel = BC_RGB888; break;
}
this->vicon_cmodel = vicon_cmodel;
+ this->draw_lock = new Mutex("AssetVIconThread::draw_lock");
}
AssetVIconThread::~AssetVIconThread()
{
}
AssetVIconThread::~AssetVIconThread()
{
+ delete draw_lock;
+}
+
+void AssetVIconThread::drawing_started()
+{
+ draw_lock->lock("AssetVIconThread::drawing_started");
+}
+
+void AssetVIconThread::drawing_stopped()
+{
+ draw_lock->unlock();
}
void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode)
}
void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode)
@@
-573,8
+585,8
@@
ViewPopup *AssetVIconThread::new_view_window()
int vx = viewing->get_vx(), rx = 0;
int vy = viewing->get_vy(), ry = 0;
wdw->get_root_coordinates(vx, vy, &rx, &ry);
int vx = viewing->get_vx(), rx = 0;
int vy = viewing->get_vy(), ry = 0;
wdw->get_root_coordinates(vx, vy, &rx, &ry);
- rx += (rx >= cx ? -view_w
: viewing->w
);
- ry += (ry >= cy ? -view_h
: viewing->h
);
+ rx += (rx >= cx ? -view_w
+viewing->w/4 : viewing->w-viewing->w/4
);
+ ry += (ry >= cy ? -view_h
+viewing->h/4 : viewing->h-viewing->h/4
);
AssetViewPopup *popup = new AssetViewPopup(this, draw_mode,
rx, ry, view_w, view_h);
if( draw_mode == ASSET_VIEW_MEDIA_MAP )
AssetViewPopup *popup = new AssetViewPopup(this, draw_mode,
rx, ry, view_w, view_h);
if( draw_mode == ASSET_VIEW_MEDIA_MAP )
@@
-2570,7
+2582,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; }
}
}